/*
               File: Guia
        Description: Guia
             Author: GeneXus C# Generator version 10_2_1-58381
       Generated on: 8/28/2012 21:2:9.67
       Program type: Callable routine
          Main DBMS: sqlserver
*/
using System;
using System.Collections;
using GeneXus.Utils;
using GeneXus.Resources;
using GeneXus.Application;
using GeneXus.Metadata;
using System.Data;
using System.Data.SqlClient;
using GeneXus.Data;
using com.genexus;
using GeneXus.Data.ADO;
using GeneXus.Data.NTier;
using GeneXus.Data.NTier.ADO;
using System.Runtime.Remoting;
using GeneXus.WebControls;
using GeneXus.Http;
using GeneXus.XML;
using GeneXus.Search;
using GeneXus.Encryption;
using GeneXus.Http.Client;
using System.Xml.Serialization;
using System.Data.SqlTypes;
using System.ServiceModel;
using System.Runtime.Serialization;
namespace GeneXus.Programs {
   public class guia : GXDataArea, System.Web.SessionState.IRequiresSessionState
   {
      protected void INITENV( )
      {
         if ( GxWebError != 0 )
         {
            return  ;
         }
      }

      protected void INITTRN( )
      {
         initialize_properties( ) ;
         entryPointCalled = false ;
         gxfirstwebparm = GetNextPar( ) ;
         gxfirstwebparm_bkp = gxfirstwebparm ;
         gxfirstwebparm = DecryptAjaxCall( gxfirstwebparm) ;
         if ( StringUtil.StrCmp(gxfirstwebparm, "dyncall") == 0 )
         {
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            dyncall( GetNextPar( )) ;
            return  ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxExecAct_"+"gxLoad_14") == 0 )
         {
            A32PeriodistaRespId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A32PeriodistaRespId", StringUtil.LTrim( StringUtil.Str( (decimal)(A32PeriodistaRespId), 4, 0)));
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxLoad_14( A32PeriodistaRespId) ;
            return  ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxExecAct_"+"gxLoad_15") == 0 )
         {
            A38PeriodistaAsisId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A38PeriodistaAsisId", StringUtil.LTrim( StringUtil.Str( (decimal)(A38PeriodistaAsisId), 4, 0)));
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxLoad_15( A38PeriodistaAsisId) ;
            return  ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxExecAct_"+"gxLoad_17") == 0 )
         {
            A16PublicidadId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxLoad_17( A16PublicidadId) ;
            return  ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxEvt") == 0 )
         {
            setAjaxEventMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxfirstwebparm = GetNextPar( ) ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxNewRow_"+"Gridguia_publicidad") == 0 )
         {
            nRC_Gridguia_publicidad = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            nGXsfl_76_idx = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            sGXsfl_76_idx = GetNextPar( ) ;
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxnrGridguia_publicidad_newrow( nRC_Gridguia_publicidad, nGXsfl_76_idx, sGXsfl_76_idx) ;
            return  ;
         }
         else
         {
            if ( ! IsValidAjaxCall( false) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxfirstwebparm = gxfirstwebparm_bkp ;
         }
         if ( ! entryPointCalled )
         {
            Gx_mode = gxfirstwebparm ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            if ( StringUtil.StrCmp(gxfirstwebparm, "viewer") != 0 )
            {
               AV7GuiaId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV7GuiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(AV7GuiaId), 4, 0)));
            }
         }
         Form.Meta.addItem("Generator", "GeneXus C# 10_2_1-58381", 0) ;
         Form.Meta.addItem("Description", "Guia", 0) ;
         context.wjLoc = "" ;
         context.nUserReturn = 0 ;
         context.wbHandled = 0 ;
         if ( StringUtil.StrCmp(context.GetRequestMethod( ), "POST") == 0 )
         {
         }
         GX_FocusControl = edtGuiaFecha_Internalname ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         wbErr = false ;
         context.SetDefaultTheme("GeneXusXEv2");
      }

      public guia( )
      {
         context = new GxContext(  );
         DataStoreUtil.LoadDataStores( context);
         dsDefault = context.GetDataStore("Default") ;
         IsMain = true;
         context.SetDefaultTheme("GeneXusXEv2");
      }

      public guia( IGxContext context )
      {
         this.context = context;
         IsMain = false;
         dsDefault = context.GetDataStore("Default") ;
      }

      public void release( )
      {
      }

      public void execute( String aP0_Gx_mode ,
                           short aP1_GuiaId )
      {
         this.Gx_mode = aP0_Gx_mode;
         this.AV7GuiaId = aP1_GuiaId;
         executePrivate();
      }

      void executePrivate( )
      {
         isStatic = false;
         webExecute();
      }

      protected override void createObjects( )
      {
      }

      public override void webExecute( )
      {
         if ( initialized == 0 )
         {
            createObjects();
            initialize();
         }
         INITENV( ) ;
         INITTRN( ) ;
         if ( ( GxWebError == 0 ) && ! isAjaxCallMode( ) )
         {
            MasterPageObj = (GXMasterPage) ClassLoader.GetInstance("appmasterpage", "GeneXus.Programs.appmasterpage", new Object[] {new GxContext( context.handle, context.DataStores, context.HttpContext)});
            MasterPageObj.setDataArea(this,false);
            MasterPageObj.webExecute();
            if ( context.isAjaxRequest( ) )
            {
               enableOutput();
               if ( ! context.isAjaxRequest( ) )
               {
                  context.GX_webresponse.AppendHeader("Cache-Control", "max-age=0");
               }
               if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) )
               {
                  context.GX_webresponse.AddString((String)(context.getJSONResponse( )));
               }
               else
               {
                  if ( context.isAjaxRequest( ) )
                  {
                     disableOutput();
                  }
                  RenderHtmlHeaders( ) ;
                  context.Redirect( context.wjLoc );
                  context.DispatchAjaxCommands();
               }
            }
         }
         this.cleanup();
      }

      protected void Draw( )
      {
         if ( context.isAjaxRequest( ) )
         {
            disableOutput();
         }
         if ( ! GxWebStd.gx_redirect( context) )
         {
            disable_std_buttons( ) ;
            enableDisable( ) ;
            set_caption( ) ;
            /* Form start */
            wb_table1_2_078( true) ;
         }
         return  ;
      }

      protected void wb_table1_2_078e( bool wbgen )
      {
         if ( wbgen )
         {
         }
         /* Execute Exit event if defined. */
      }

      protected void wb_table1_2_078( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "" ;
            GxWebStd.gx_table_start( context, tblTablemain_Internalname, tblTablemain_Internalname, "", "TableBorder100x100", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            wb_table2_5_078( true) ;
         }
         return  ;
      }

      protected void wb_table2_5_078e( bool wbgen )
      {
         if ( wbgen )
         {
            /* Control Group */
            ClassString = "Group" ;
            StyleString = "" ;
            context.WriteHtmlText( "<fieldset id=\""+grpGroupdata_Internalname+"\""+" style=\"-moz-border-radius:3pt;\""+" class=\""+ClassString+"\">") ;
            context.WriteHtmlText( "<legend class=\""+ClassString+"Title"+"\">"+"Guia"+"</legend>") ;
            wb_table3_28_078( true) ;
         }
         return  ;
      }

      protected void wb_table3_28_078e( bool wbgen )
      {
         if ( wbgen )
         {
            context.WriteHtmlText( "</fieldset>") ;
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table1_2_078e( true) ;
         }
         else
         {
            wb_table1_2_078e( false) ;
         }
      }

      protected void wb_table3_28_078( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "" ;
            GxWebStd.gx_table_start( context, tblTable1_Internalname, tblTable1_Internalname, "", "Table", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            ClassString = "ErrorViewer" ;
            StyleString = "" ;
            GxWebStd.gx_msg_list( context, "", context.GX_msglist.DisplayMode, StyleString, ClassString, "", "false");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            wb_table4_34_078( true) ;
         }
         return  ;
      }

      protected void wb_table4_34_078e( bool wbgen )
      {
         if ( wbgen )
         {
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 81,'',false,'',0)\"" ;
            ClassString = "BtnEnter" ;
            StyleString = "" ;
            GxWebStd.gx_button_ctrl( context, bttBtn_enter_Internalname, "", "Confirmar", bttBtn_enter_Jsonclick, 5, "Confirmar", "", StyleString, ClassString, bttBtn_enter_Visible, 1, "standard", "EENTER.", TempTags, "", context.GetButtonType( ), "HLP_Guia.htm");
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 82,'',false,'',0)\"" ;
            ClassString = "BtnCancel" ;
            StyleString = "" ;
            GxWebStd.gx_button_ctrl( context, bttBtn_cancel_Internalname, "", "Cancelar", bttBtn_cancel_Jsonclick, 1, "Cancelar", "", StyleString, ClassString, bttBtn_cancel_Visible, 1, "standard", "ECANCEL.", TempTags, "", context.GetButtonType( ), "HLP_Guia.htm");
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 83,'',false,'',0)\"" ;
            ClassString = "BtnDelete" ;
            StyleString = "" ;
            GxWebStd.gx_button_ctrl( context, bttBtn_delete_Internalname, "", "Eliminar", bttBtn_delete_Jsonclick, 5, "Eliminar", "", StyleString, ClassString, bttBtn_delete_Visible, 0, "standard", "EDELETE.", TempTags, "", context.GetButtonType( ), "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table3_28_078e( true) ;
         }
         else
         {
            wb_table3_28_078e( false) ;
         }
      }

      protected void wb_table4_34_078( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "" ;
            GxWebStd.gx_table_start( context, tblTable2_Internalname, tblTable2_Internalname, "", "Table", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td class=\"td5\"  style=\"vertical-align:top\">") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockguiaid_Internalname, "Id", "", "", lblTextblockguiaid_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            ClassString = "Attribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtGuiaId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A22GuiaId), 4, 0, ",", "")), ((edtGuiaId_Enabled!=0) ? StringUtil.LTrim( context.localUtil.Format( (decimal)(A22GuiaId), "ZZZ9")) : context.localUtil.Format( (decimal)(A22GuiaId), "ZZZ9")), "", "", "", "", "", "", edtGuiaId_Jsonclick, 0, ClassString, StyleString, "", 1, edtGuiaId_Enabled, 0, "text", "", 4, "chr", 1, "row", 4, 0, 0, 0, 1, -1, true, "Id", "right", "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td class=\"td5\"  style=\"vertical-align:top\">") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockguiafecha_Internalname, "Fecha", "", "", lblTextblockguiafecha_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 44,'',false,'',0)\"" ;
            ClassString = "Attribute" ;
            StyleString = "" ;
            context.WriteHtmlText( "<div id=\""+edtGuiaFecha_Internalname+"_dp_container\" class=\"dp_container\" style=\"white-space:nowrap;display:inline;\">") ;
            GxWebStd.gx_single_line_edit( context, edtGuiaFecha_Internalname, context.localUtil.Format(A23GuiaFecha, "99/99/99"), context.localUtil.Format( A23GuiaFecha, "99/99/99"), TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+"gx.date.valid_date(this, 8,'DMY',0,24,'spa',false,0);"+";gx.evt.onblur(44);\"", "", "", "", "", "", edtGuiaFecha_Jsonclick, 0, ClassString, StyleString, "", 1, edtGuiaFecha_Enabled, 0, "text", "", 8, "chr", 1, "row", 8, 0, 0, 0, 1, -1, true, "", "right", "HLP_Guia.htm");
            GxWebStd.gx_bitmap( context, edtGuiaFecha_Internalname+"_dp_trigger", context.GetImagePath( "61b9b5d3-dff6-4d59-9b00-da61bc2cbe93", "", context.GetTheme( )), "", "", "", "", ((1==0)||(edtGuiaFecha_Enabled==0) ? 0 : 1), 0, "Date selector", "Date selector", 0, 1, 0, "", 0, "", 0, 0, 0, "", "", "cursor: pointer;vertical-align:text-bottom", "", "", "", "", "", "", 1, false, false, "HLP_Guia.htm");
            context.WriteHtmlTextNl( "</div>") ;
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td class=\"td5\"  style=\"vertical-align:top\">") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockguiadescripcion_Internalname, "Descripcion", "", "", lblTextblockguiadescripcion_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 49,'',false,'',0)\"" ;
            ClassString = "Attribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtGuiaDescripcion_Internalname, StringUtil.RTrim( A24GuiaDescripcion), StringUtil.RTrim( context.localUtil.Format( A24GuiaDescripcion, "")), TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+""+";gx.evt.onblur(49);\"", "", "", "", "", "", edtGuiaDescripcion_Jsonclick, 0, ClassString, StyleString, "", 1, edtGuiaDescripcion_Enabled, 0, "text", "", 40, "chr", 1, "row", 40, 0, 0, 0, 1, -1, true, "", "left", "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td class=\"td5\"  style=\"vertical-align:top\">") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockperiodistarespid_Internalname, "Resp Id", "", "", lblTextblockperiodistarespid_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 54,'',false,'',0)\"" ;
            ClassString = "Attribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtPeriodistaRespId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A32PeriodistaRespId), 4, 0, ",", "")), StringUtil.LTrim( context.localUtil.Format( (decimal)(A32PeriodistaRespId), "ZZZ9")), TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+"gx.num.valid_integer( this,'.');"+";gx.evt.onblur(54);\"", "", "", "", "", "", edtPeriodistaRespId_Jsonclick, 0, ClassString, StyleString, "", 1, edtPeriodistaRespId_Enabled, 1, "text", "", 4, "chr", 1, "row", 4, 0, 0, 0, 1, -1, true, "Id", "right", "HLP_Guia.htm");
            /* Static images/pictures */
            ClassString = "Image" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgprompt_32_Internalname, "prompt.gif", imgprompt_32_Link, "", "", context.GetTheme( ), imgprompt_32_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, 0, "", "", StyleString, ClassString, "", "", "", "''", "", 1, false, false, "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td class=\"td5\"  style=\"vertical-align:top\">") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockperiodistarespnom_Internalname, "Resp Nom", "", "", lblTextblockperiodistarespnom_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            ClassString = "Attribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtPeriodistaRespNom_Internalname, StringUtil.RTrim( A33PeriodistaRespNom), StringUtil.RTrim( context.localUtil.Format( A33PeriodistaRespNom, "")), "", "", "", "", "", "", edtPeriodistaRespNom_Jsonclick, 0, ClassString, StyleString, "", 1, edtPeriodistaRespNom_Enabled, 0, "text", "", 40, "chr", 1, "row", 40, 0, 0, 0, 1, -1, true, "", "left", "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td class=\"td5\"  style=\"vertical-align:top\">") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockperiodistaasisid_Internalname, "Asis Id", "", "", lblTextblockperiodistaasisid_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 64,'',false,'',0)\"" ;
            ClassString = "Attribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtPeriodistaAsisId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A38PeriodistaAsisId), 4, 0, ",", "")), StringUtil.LTrim( context.localUtil.Format( (decimal)(A38PeriodistaAsisId), "ZZZ9")), TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+"gx.num.valid_integer( this,'.');"+";gx.evt.onblur(64);\"", "", "", "", "", "", edtPeriodistaAsisId_Jsonclick, 0, ClassString, StyleString, "", 1, edtPeriodistaAsisId_Enabled, 1, "text", "", 4, "chr", 1, "row", 4, 0, 0, 0, 1, -1, true, "Id", "right", "HLP_Guia.htm");
            /* Static images/pictures */
            ClassString = "Image" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgprompt_38_Internalname, "prompt.gif", imgprompt_38_Link, "", "", context.GetTheme( ), imgprompt_38_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, 0, "", "", StyleString, ClassString, "", "", "", "''", "", 1, false, false, "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td class=\"td5\"  style=\"vertical-align:top\">") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockperiodistaasisnom_Internalname, "Asis Nom", "", "", lblTextblockperiodistaasisnom_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            ClassString = "Attribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtPeriodistaAsisNom_Internalname, StringUtil.RTrim( A39PeriodistaAsisNom), StringUtil.RTrim( context.localUtil.Format( A39PeriodistaAsisNom, "")), "", "", "", "", "", "", edtPeriodistaAsisNom_Jsonclick, 0, ClassString, StyleString, "", 1, edtPeriodistaAsisNom_Enabled, 0, "text", "", 40, "chr", 1, "row", 40, 0, 0, 0, 1, -1, true, "", "left", "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td colspan=\"2\" >") ;
            context.WriteHtmlText( "<br/>") ;
            wb_table5_72_078( true) ;
         }
         return  ;
      }

      protected void wb_table5_72_078e( bool wbgen )
      {
         if ( wbgen )
         {
            context.WriteHtmlText( "<hr class=\"HRDefault\"/>") ;
            /*  Grid Control  */
            Gridguia_publicidadContainer.AddObjectProperty("GridName", "Gridguia_publicidad");
            Gridguia_publicidadContainer.AddObjectProperty("Class", "Grid");
            Gridguia_publicidadContainer.AddObjectProperty("Cellpadding", StringUtil.LTrim( StringUtil.NToC( (decimal)(1), 4, 0, ".", "")));
            Gridguia_publicidadContainer.AddObjectProperty("Cellspacing", StringUtil.LTrim( StringUtil.NToC( (decimal)(2), 4, 0, ".", "")));
            Gridguia_publicidadContainer.AddObjectProperty("Backcolorstyle", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGridguia_publicidad_Backcolorstyle), 1, 0, ".", "")));
            Gridguia_publicidadContainer.AddObjectProperty("CmpContext", "");
            Gridguia_publicidadContainer.AddObjectProperty("InMasterPage", "false");
            Gridguia_publicidadColumn = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Gridguia_publicidadColumn.AddObjectProperty("Value", StringUtil.LTrim( StringUtil.NToC( (decimal)(A16PublicidadId), 4, 0, ".", "")));
            Gridguia_publicidadColumn.AddObjectProperty("Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtPublicidadId_Enabled), 5, 0, ".", "")));
            Gridguia_publicidadContainer.AddColumnProperties(Gridguia_publicidadColumn);
            Gridguia_publicidadColumn = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Gridguia_publicidadContainer.AddColumnProperties(Gridguia_publicidadColumn);
            Gridguia_publicidadColumn = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Gridguia_publicidadColumn.AddObjectProperty("Value", StringUtil.LTrim( StringUtil.NToC( (decimal)(A19PublicidadCosto), 4, 0, ".", "")));
            Gridguia_publicidadColumn.AddObjectProperty("Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtPublicidadCosto_Enabled), 5, 0, ".", "")));
            Gridguia_publicidadContainer.AddColumnProperties(Gridguia_publicidadColumn);
            Gridguia_publicidadContainer.AddObjectProperty("Allowselection", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGridguia_publicidad_Allowselection), 1, 0, ".", "")));
            Gridguia_publicidadContainer.AddObjectProperty("Selectioncolor", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGridguia_publicidad_Selectioncolor), 9, 0, ".", "")));
            Gridguia_publicidadContainer.AddObjectProperty("Allowhover", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGridguia_publicidad_Allowhovering), 1, 0, ".", "")));
            Gridguia_publicidadContainer.AddObjectProperty("Hovercolor", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGridguia_publicidad_Hoveringcolor), 9, 0, ".", "")));
            Gridguia_publicidadContainer.AddObjectProperty("Allowcollapsing", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGridguia_publicidad_Allowcollapsing), 1, 0, ".", "")));
            Gridguia_publicidadContainer.AddObjectProperty("Collapsed", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGridguia_publicidad_Collapsed), 1, 0, ".", "")));
            nGXsfl_76_idx = 0 ;
            if ( ( nKeyPressed == 1 ) && ( AnyError == 0 ) )
            {
               /* Enter key processing. */
               nBlankRcdCount12 = 10 ;
               if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
               {
                  /* Display confirmed (stored) records */
                  nRcdExists_12 = 1 ;
                  ScanStart0712( ) ;
                  while ( RcdFound12 != 0 )
                  {
                     init_level_properties12( ) ;
                     getByPrimaryKey0712( ) ;
                     AddRow0712( ) ;
                     ScanNext0712( ) ;
                  }
                  ScanEnd0712( ) ;
                  nBlankRcdCount12 = 10 ;
               }
            }
            else if ( ( nKeyPressed == 3 ) || ( nKeyPressed == 4 ) || ( ( nKeyPressed == 1 ) && ( AnyError != 0 ) ) )
            {
               /* Button check  or addlines. */
               standaloneNotModal0712( ) ;
               standaloneModal0712( ) ;
               sMode12 = Gx_mode ;
               while ( nGXsfl_76_idx < nRC_Gridguia_publicidad )
               {
                  ReadRow0712( ) ;
                  edtPublicidadId_Enabled = (int)(context.localUtil.CToN( cgiGet( "PUBLICIDADID_"+sGXsfl_76_idx+"Enabled"), ",", ".")) ;
                  edtPublicidadCosto_Enabled = (int)(context.localUtil.CToN( cgiGet( "PUBLICIDADCOSTO_"+sGXsfl_76_idx+"Enabled"), ",", ".")) ;
                  imgprompt_32_Link = cgiGet( "PROMPT_16_"+sGXsfl_76_idx+"Link") ;
                  if ( ( nRcdExists_12 == 0 ) && ( StringUtil.StrCmp(Gx_mode, "INS") != 0 ) )
                  {
                     Gx_mode = "INS" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                     standaloneModal0712( ) ;
                  }
                  SendRow0712( ) ;
               }
               Gx_mode = sMode12 ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            }
            else
            {
               /* Get or get-alike key processing. */
               nBlankRcdCount12 = 10 ;
               nRcdExists_12 = 1 ;
               ScanStart0712( ) ;
               while ( RcdFound12 != 0 )
               {
                  init_level_properties12( ) ;
                  getByPrimaryKey0712( ) ;
                  standaloneNotModal0712( ) ;
                  standaloneModal0712( ) ;
                  AddRow0712( ) ;
                  ScanNext0712( ) ;
               }
               ScanEnd0712( ) ;
            }
            /* Initialize fields for 'new' records and send them. */
            if ( ( StringUtil.StrCmp(Gx_mode, "DSP") != 0 ) && ( StringUtil.StrCmp(Gx_mode, "DLT") != 0 ) )
            {
               sMode12 = Gx_mode ;
               Gx_mode = "INS" ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
               InitAll0712( ) ;
               init_level_properties12( ) ;
               standaloneNotModal0712( ) ;
               standaloneModal0712( ) ;
               nRcdExists_12 = 0 ;
               nIsMod_12 = 0 ;
               nBlankRcdCount12 = (short)(nBlankRcdUsr12+nBlankRcdCount12) ;
               fRowAdded = 0 ;
               while ( nBlankRcdCount12 > 0 )
               {
                  AddRow0712( ) ;
                  if ( ( nKeyPressed == 4 ) && ( fRowAdded == 0 ) )
                  {
                     fRowAdded = 1 ;
                     GX_FocusControl = edtPublicidadId_Internalname ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  }
                  nBlankRcdCount12 = (short)(nBlankRcdCount12-1) ;
               }
               Gx_mode = sMode12 ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            }
            sStyleString = " style=\"display:none;\"" ;
            sStyleString = "" ;
            context.WriteHtmlText( "<div id=\""+"Gridguia_publicidadContainer"+"Div\" "+sStyleString+">"+"</div>") ;
            context.httpAjaxContext.ajax_rsp_assign_grid("_"+"Gridguia_publicidad", (Object)(Gridguia_publicidadContainer));
            if ( ! context.isAjaxRequest( ) )
            {
               GxWebStd.gx_hidden_field( context, "Gridguia_publicidadContainerData", Gridguia_publicidadContainer.ToJavascriptSource());
            }
            if ( context.isAjaxRequest( ) )
            {
               GxWebStd.gx_hidden_field( context, "Gridguia_publicidadContainerData"+"V", Gridguia_publicidadContainer.GridValuesHidden());
            }
            else
            {
               context.WriteHtmlText( "<input type=\"hidden\" "+"name=\""+"Gridguia_publicidadContainerData"+"V"+"\" value='"+Gridguia_publicidadContainer.GridValuesHidden()+"'/>") ;
            }
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table4_34_078e( true) ;
         }
         else
         {
            wb_table4_34_078e( false) ;
         }
      }

      protected void wb_table5_72_078( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "" ;
            GxWebStd.gx_table_start( context, tblTable3_Internalname, tblTable3_Internalname, "", "Table95", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td class=\"SubTitle\" >") ;
            /* Text block */
            ClassString = "" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTitlepublicidad_Internalname, "Publicidad", "", "", lblTitlepublicidad_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Guia.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table5_72_078e( true) ;
         }
         else
         {
            wb_table5_72_078e( false) ;
         }
      }

      protected void wb_table2_5_078( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "" ;
            GxWebStd.gx_table_start( context, tblTabletoolbar_Internalname, tblTabletoolbar_Internalname, "", "ViewTable", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Div Control */
            ClassString = "ToolbarMain" ;
            StyleString = "" ;
            GxWebStd.gx_div_start( context, divSectiontoolbar_Internalname, 1, 0, "px", 0, "px", ClassString);
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 9,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_first_Internalname, context.GetImagePath( "b9e06284-17ac-4c88-8937-5dbd84ad5d80", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_first_Visible, 1, "", "Primero", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_first_Jsonclick, "EFIRST.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 10,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_first_separator_Internalname, context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_first_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_first_separator_Jsonclick, "EFIRST.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 11,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_previous_Internalname, context.GetImagePath( "7d212604-db7b-4785-9c0d-5faffe71aa33", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_previous_Visible, 1, "", "Anterior", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_previous_Jsonclick, "EPREVIOUS.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 12,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_previous_separator_Internalname, context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_previous_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_previous_separator_Jsonclick, "EPREVIOUS.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 13,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_next_Internalname, context.GetImagePath( "1ae947cf-1354-41a9-8d59-d91daebf554f", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_next_Visible, 1, "", "Siguiente", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_next_Jsonclick, "ENEXT.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 14,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_next_separator_Internalname, context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_next_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_next_separator_Jsonclick, "ENEXT.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 15,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_last_Internalname, context.GetImagePath( "29211874-e613-48e5-9011-8017d984217e", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_last_Visible, 1, "", "Ultimo", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_last_Jsonclick, "ELAST.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 16,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_last_separator_Internalname, context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_last_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_last_separator_Jsonclick, "ELAST.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 17,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_select_Internalname, context.GetImagePath( "1ca03f75-9947-4d2c-90a4-e8ab9c5cedea", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_select_Visible, 1, "", "Seleccionar", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_select_Jsonclick, "ESELECT.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 18,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_select_separator_Internalname, context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_select_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_select_separator_Jsonclick, "ESELECT.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 19,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_enter2_Internalname, context.GetImagePath( "2061cf2c-bd33-4433-a13e-34af954142e9", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_enter2_Visible, imgBtn_enter2_Enabled, "", "Confirmar", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_enter2_Jsonclick, "EENTER.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 20,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_enter2_separator_Internalname, context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_enter2_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_enter2_separator_Jsonclick, "EENTER.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 21,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_cancel2_Internalname, context.GetImagePath( "0e94ced8-bc34-47ff-9a53-bc683736a686", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_cancel2_Visible, 1, "", "Cancelar", 0, 0, 0, "", 0, "", 0, 0, 1, imgBtn_cancel2_Jsonclick, "ECANCEL.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 22,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_cancel2_separator_Internalname, context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_cancel2_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, 1, imgBtn_cancel2_separator_Jsonclick, "ECANCEL.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 23,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_delete2_Internalname, context.GetImagePath( "7695fe89-52c9-4b7e-871e-0e11548f823e", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_delete2_Visible, imgBtn_delete2_Enabled, "", "Eliminar", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_delete2_Jsonclick, "EDELETE.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 24,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_delete2_separator_Internalname, context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", context.GetTheme( )), "", "", "", context.GetTheme( ), imgBtn_delete2_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, 5, imgBtn_delete2_separator_Jsonclick, "EDELETE.", StyleString, ClassString, "", "", ""+TempTags, "", "", 1, false, false, "HLP_Guia.htm");
            context.WriteHtmlText( "</div>") ;
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table2_5_078e( true) ;
         }
         else
         {
            wb_table2_5_078e( false) ;
         }
      }

      protected void UserMain( )
      {
         standaloneStartup( ) ;
      }

      protected void standaloneStartup( )
      {
         standaloneStartupServer( ) ;
         disable_std_buttons( ) ;
         enableDisable( ) ;
         Process( ) ;
      }

      protected void standaloneStartupServer( )
      {
         /* Execute Start event if defined. */
         context.wbGlbDoneStart = 0 ;
         /* Execute user event: E11072 */
         E11072 ();
         context.wbGlbDoneStart = 1 ;
         assign_properties_default( ) ;
         if ( AnyError == 0 )
         {
            if ( StringUtil.StrCmp(context.GetRequestMethod( ), "POST") == 0 )
            {
               /* Read saved SDTs. */
               /* Read variables values. */
               A22GuiaId = (short)(context.localUtil.CToN( cgiGet( edtGuiaId_Internalname), ",", ".")) ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A22GuiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A22GuiaId), 4, 0)));
               if ( context.localUtil.VCDate( cgiGet( edtGuiaFecha_Internalname), 2) == 0 )
               {
                  GX_msglist.addItem(context.GetMessage( "GXM_faildate", new   object[]  {"Guia Fecha"}), 1, "GUIAFECHA");
                  AnyError = 1 ;
                  GX_FocusControl = edtGuiaFecha_Internalname ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  wbErr = true ;
                  A23GuiaFecha = DateTime.MinValue ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A23GuiaFecha", context.localUtil.Format(A23GuiaFecha, "99/99/99"));
               }
               else
               {
                  A23GuiaFecha = context.localUtil.CToD( cgiGet( edtGuiaFecha_Internalname), 2) ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A23GuiaFecha", context.localUtil.Format(A23GuiaFecha, "99/99/99"));
               }
               A24GuiaDescripcion = cgiGet( edtGuiaDescripcion_Internalname) ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A24GuiaDescripcion", A24GuiaDescripcion);
               if ( ( ( context.localUtil.CToN( cgiGet( edtPeriodistaRespId_Internalname), ",", ".") < Convert.ToDecimal( 0 )) ) || ( ( context.localUtil.CToN( cgiGet( edtPeriodistaRespId_Internalname), ",", ".") > Convert.ToDecimal( 9999 )) ) )
               {
                  GX_msglist.addItem(context.GetMessage( "GXM_badnum", ""), 1, "PERIODISTARESPID");
                  AnyError = 1 ;
                  GX_FocusControl = edtPeriodistaRespId_Internalname ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  wbErr = true ;
                  A32PeriodistaRespId = 0 ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A32PeriodistaRespId", StringUtil.LTrim( StringUtil.Str( (decimal)(A32PeriodistaRespId), 4, 0)));
               }
               else
               {
                  A32PeriodistaRespId = (short)(context.localUtil.CToN( cgiGet( edtPeriodistaRespId_Internalname), ",", ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A32PeriodistaRespId", StringUtil.LTrim( StringUtil.Str( (decimal)(A32PeriodistaRespId), 4, 0)));
               }
               A33PeriodistaRespNom = cgiGet( edtPeriodistaRespNom_Internalname) ;
               n33PeriodistaRespNom = false ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A33PeriodistaRespNom", A33PeriodistaRespNom);
               if ( ( ( context.localUtil.CToN( cgiGet( edtPeriodistaAsisId_Internalname), ",", ".") < Convert.ToDecimal( 0 )) ) || ( ( context.localUtil.CToN( cgiGet( edtPeriodistaAsisId_Internalname), ",", ".") > Convert.ToDecimal( 9999 )) ) )
               {
                  GX_msglist.addItem(context.GetMessage( "GXM_badnum", ""), 1, "PERIODISTAASISID");
                  AnyError = 1 ;
                  GX_FocusControl = edtPeriodistaAsisId_Internalname ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  wbErr = true ;
                  A38PeriodistaAsisId = 0 ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A38PeriodistaAsisId", StringUtil.LTrim( StringUtil.Str( (decimal)(A38PeriodistaAsisId), 4, 0)));
               }
               else
               {
                  A38PeriodistaAsisId = (short)(context.localUtil.CToN( cgiGet( edtPeriodistaAsisId_Internalname), ",", ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A38PeriodistaAsisId", StringUtil.LTrim( StringUtil.Str( (decimal)(A38PeriodistaAsisId), 4, 0)));
               }
               A39PeriodistaAsisNom = cgiGet( edtPeriodistaAsisNom_Internalname) ;
               n39PeriodistaAsisNom = false ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A39PeriodistaAsisNom", A39PeriodistaAsisNom);
               /* Read saved values. */
               Z22GuiaId = (short)(context.localUtil.CToN( cgiGet( "Z22GuiaId"), ",", ".")) ;
               Z23GuiaFecha = context.localUtil.CToD( cgiGet( "Z23GuiaFecha"), 0) ;
               Z24GuiaDescripcion = cgiGet( "Z24GuiaDescripcion") ;
               Z32PeriodistaRespId = (short)(context.localUtil.CToN( cgiGet( "Z32PeriodistaRespId"), ",", ".")) ;
               Z38PeriodistaAsisId = (short)(context.localUtil.CToN( cgiGet( "Z38PeriodistaAsisId"), ",", ".")) ;
               IsConfirmed = (short)(context.localUtil.CToN( cgiGet( "IsConfirmed"), ",", ".")) ;
               IsModified = (short)(context.localUtil.CToN( cgiGet( "IsModified"), ",", ".")) ;
               Gx_mode = cgiGet( "Mode") ;
               nRC_Gridguia_publicidad = (short)(context.localUtil.CToN( cgiGet( "nRC_Gridguia_publicidad"), ",", ".")) ;
               N32PeriodistaRespId = (short)(context.localUtil.CToN( cgiGet( "N32PeriodistaRespId"), ",", ".")) ;
               N38PeriodistaAsisId = (short)(context.localUtil.CToN( cgiGet( "N38PeriodistaAsisId"), ",", ".")) ;
               AV7GuiaId = (short)(context.localUtil.CToN( cgiGet( "vGUIAID"), ",", ".")) ;
               AV12Insert_PeriodistaRespId = (short)(context.localUtil.CToN( cgiGet( "vINSERT_PERIODISTARESPID"), ",", ".")) ;
               AV13Insert_PeriodistaAsisId = (short)(context.localUtil.CToN( cgiGet( "vINSERT_PERIODISTAASISID"), ",", ".")) ;
               AV15Pgmname = cgiGet( "vPGMNAME") ;
               Gx_mode = cgiGet( "vMODE") ;
               /* Read subfile selected row values. */
               /* Read hidden variables. */
               standaloneNotModal( ) ;
            }
            else
            {
               standaloneNotModal( ) ;
               if ( StringUtil.StrCmp(gxfirstwebparm, "viewer") == 0 )
               {
                  Gx_mode = "DSP" ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                  A22GuiaId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A22GuiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A22GuiaId), 4, 0)));
                  getEqualNoModal( ) ;
                  Gx_mode = "DSP" ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                  disable_std_buttons( ) ;
                  standaloneModal( ) ;
               }
               else
               {
                  if ( StringUtil.StrCmp(Gx_mode, "DSP") == 0 )
                  {
                     sMode8 = Gx_mode ;
                     Gx_mode = "UPD" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                     Gx_mode = sMode8 ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                  }
                  standaloneModal( ) ;
                  if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
                  {
                     getByPrimaryKey( ) ;
                     if ( RcdFound8 == 1 )
                     {
                        if ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 )
                        {
                           /* Confirm record */
                           CONFIRM_070( ) ;
                           if ( AnyError == 0 )
                           {
                              GX_FocusControl = bttBtn_enter_Internalname ;
                              context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                           }
                        }
                     }
                     else
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_noinsert", ""), 1, "GUIAID");
                        AnyError = 1 ;
                     }
                  }
               }
            }
         }
      }

      protected void Process( )
      {
         if ( StringUtil.StrCmp(context.GetRequestMethod( ), "POST") == 0 )
         {
            /* Read Transaction buttons. */
            sEvt = cgiGet( "_EventName") ;
            EvtGridId = cgiGet( "_EventGridId") ;
            EvtRowId = cgiGet( "_EventRowId") ;
            if ( StringUtil.Len( sEvt) > 0 )
            {
               sEvtType = StringUtil.Left( sEvt, 1) ;
               sEvt = StringUtil.Right( sEvt, (short)(StringUtil.Len( sEvt)-1)) ;
               /* Check if conditions changed and reset current page numbers */
               if ( StringUtil.StrCmp(sEvtType, "M") != 0 )
               {
                  if ( StringUtil.StrCmp(sEvtType, "E") == 0 )
                  {
                     sEvtType = StringUtil.Right( sEvt, 1) ;
                     if ( StringUtil.StrCmp(sEvtType, ".") == 0 )
                     {
                        sEvt = StringUtil.Left( sEvt, (short)(StringUtil.Len( sEvt)-1)) ;
                        if ( StringUtil.StrCmp(sEvt, "START") == 0 )
                        {
                           context.wbHandled = 1 ;
                           dynload_actions( ) ;
                           /* Execute user event: E11072 */
                           E11072 ();
                        }
                        else if ( StringUtil.StrCmp(sEvt, "AFTER TRN") == 0 )
                        {
                           context.wbHandled = 1 ;
                           dynload_actions( ) ;
                           /* Execute user event: E12072 */
                           E12072 ();
                        }
                        else if ( StringUtil.StrCmp(sEvt, "ENTER") == 0 )
                        {
                           context.wbHandled = 1 ;
                           if ( StringUtil.StrCmp(Gx_mode, "DSP") != 0 )
                           {
                              btn_enter( ) ;
                           }
                           /* No code required for Cancel button. It is implemented as the Reset button. */
                        }
                        else if ( StringUtil.StrCmp(sEvt, "FIRST") == 0 )
                        {
                           context.wbHandled = 1 ;
                        }
                        else if ( StringUtil.StrCmp(sEvt, "PREVIOUS") == 0 )
                        {
                           context.wbHandled = 1 ;
                        }
                        else if ( StringUtil.StrCmp(sEvt, "NEXT") == 0 )
                        {
                           context.wbHandled = 1 ;
                        }
                        else if ( StringUtil.StrCmp(sEvt, "LAST") == 0 )
                        {
                           context.wbHandled = 1 ;
                        }
                        else if ( StringUtil.StrCmp(sEvt, "SELECT") == 0 )
                        {
                           context.wbHandled = 1 ;
                        }
                        else if ( StringUtil.StrCmp(sEvt, "DELETE") == 0 )
                        {
                           context.wbHandled = 1 ;
                           if ( StringUtil.StrCmp(Gx_mode, "DSP") != 0 )
                           {
                              btn_delete( ) ;
                           }
                        }
                     }
                     else
                     {
                        sEvtType = StringUtil.Right( sEvt, 4) ;
                        sEvt = StringUtil.Left( sEvt, (short)(StringUtil.Len( sEvt)-4)) ;
                     }
                  }
                  context.wbHandled = 1 ;
               }
            }
         }
      }

      protected void AfterTrn( )
      {
         if ( trnEnded == 1 )
         {
            /* Execute user event: E12072 */
            E12072 ();
            trnEnded = 0 ;
            standaloneNotModal( ) ;
            standaloneModal( ) ;
            if ( ( StringUtil.StrCmp(Gx_mode, "INS") == 0 )  )
            {
               /* Clear variables for new insertion. */
               InitAll078( ) ;
               standaloneNotModal( ) ;
               standaloneModal( ) ;
            }
         }
      }

      public override String ToString( )
      {
         return "" ;
      }

      public GxContentInfo GetContentInfo( )
      {
         return (GxContentInfo)(null) ;
      }

      protected void disable_std_buttons( )
      {
         imgBtn_delete2_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_delete2_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_delete2_Visible), 5, 0)));
         imgBtn_delete2_separator_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_delete2_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_delete2_separator_Visible), 5, 0)));
         bttBtn_delete_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, bttBtn_delete_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(bttBtn_delete_Visible), 5, 0)));
         imgBtn_first_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_first_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_first_Visible), 5, 0)));
         imgBtn_first_separator_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_first_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_first_separator_Visible), 5, 0)));
         imgBtn_previous_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_previous_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_previous_Visible), 5, 0)));
         imgBtn_previous_separator_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_previous_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_previous_separator_Visible), 5, 0)));
         imgBtn_next_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_next_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_next_Visible), 5, 0)));
         imgBtn_next_separator_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_next_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_next_separator_Visible), 5, 0)));
         imgBtn_last_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_last_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_last_Visible), 5, 0)));
         imgBtn_last_separator_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_last_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_last_separator_Visible), 5, 0)));
         imgBtn_select_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_select_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_select_Visible), 5, 0)));
         imgBtn_select_separator_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_select_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_select_separator_Visible), 5, 0)));
         if ( ( StringUtil.StrCmp(Gx_mode, "DSP") == 0 ) || ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 ) )
         {
            imgBtn_delete2_Visible = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_delete2_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_delete2_Visible), 5, 0)));
            imgBtn_delete2_separator_Visible = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_delete2_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_delete2_separator_Visible), 5, 0)));
            bttBtn_delete_Visible = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, bttBtn_delete_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(bttBtn_delete_Visible), 5, 0)));
            if ( StringUtil.StrCmp(Gx_mode, "DSP") == 0 )
            {
               imgBtn_enter2_Visible = 0 ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_enter2_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_enter2_Visible), 5, 0)));
               imgBtn_enter2_separator_Visible = 0 ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_enter2_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_enter2_separator_Visible), 5, 0)));
               bttBtn_enter_Visible = 0 ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, bttBtn_enter_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(bttBtn_enter_Visible), 5, 0)));
            }
            DisableAttributes078( ) ;
         }
      }

      protected void set_caption( )
      {
         if ( ( IsConfirmed == 1 ) && ( AnyError == 0 ) )
         {
            if ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_confdelete", ""), 0, "");
            }
            else
            {
               GX_msglist.addItem(context.GetMessage( "GXM_mustconfirm", ""), 0, "");
            }
         }
      }

      protected void CONFIRM_070( )
      {
         BeforeValidate078( ) ;
         if ( AnyError == 0 )
         {
            if ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 )
            {
               OnDeleteControls078( ) ;
            }
            else
            {
               CheckExtendedTable078( ) ;
               CloseExtendedTableCursors078( ) ;
            }
         }
         if ( AnyError == 0 )
         {
            /* Save parent mode. */
            sMode8 = Gx_mode ;
            CONFIRM_0712( ) ;
            if ( AnyError == 0 )
            {
               /* Restore parent mode. */
               Gx_mode = sMode8 ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
               IsConfirmed = 1 ;
            }
            /* Restore parent mode. */
            Gx_mode = sMode8 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
      }

      protected void CONFIRM_0712( )
      {
         nGXsfl_76_idx = 0 ;
         while ( nGXsfl_76_idx < nRC_Gridguia_publicidad )
         {
            ReadRow0712( ) ;
            if ( ( nRcdExists_12 != 0 ) || ( nIsMod_12 != 0 ) )
            {
               GetKey0712( ) ;
               if ( ( nRcdExists_12 == 0 ) && ( nRcdDeleted_12 == 0 ) )
               {
                  if ( RcdFound12 == 0 )
                  {
                     Gx_mode = "INS" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                     BeforeValidate0712( ) ;
                     if ( AnyError == 0 )
                     {
                        CheckExtendedTable0712( ) ;
                        CloseExtendedTableCursors0712( ) ;
                        if ( AnyError == 0 )
                        {
                           IsConfirmed = 1 ;
                        }
                     }
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_noupdate", ""), "DuplicatePrimaryKey", 1, "PUBLICIDADID");
                     AnyError = 1 ;
                     GX_FocusControl = edtPublicidadId_Internalname ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  }
               }
               else
               {
                  if ( RcdFound12 != 0 )
                  {
                     if ( nRcdDeleted_12 != 0 )
                     {
                        Gx_mode = "DLT" ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                        getByPrimaryKey0712( ) ;
                        Load0712( ) ;
                        BeforeValidate0712( ) ;
                        if ( AnyError == 0 )
                        {
                           OnDeleteControls0712( ) ;
                        }
                     }
                     else
                     {
                        if ( nIsMod_12 != 0 )
                        {
                           Gx_mode = "UPD" ;
                           context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                           BeforeValidate0712( ) ;
                           if ( AnyError == 0 )
                           {
                              CheckExtendedTable0712( ) ;
                              CloseExtendedTableCursors0712( ) ;
                              if ( AnyError == 0 )
                              {
                                 IsConfirmed = 1 ;
                              }
                           }
                        }
                     }
                  }
                  else
                  {
                     if ( nRcdDeleted_12 == 0 )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_recdeleted", ""), 1, "PUBLICIDADID");
                        AnyError = 1 ;
                        GX_FocusControl = edtPublicidadId_Internalname ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                     }
                  }
               }
            }
            ChangePostValue( edtPublicidadId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A16PublicidadId), 4, 0, ",", ""))) ;
            ChangePostValue( edtPublicidadCosto_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A19PublicidadCosto), 4, 0, ",", ""))) ;
            ChangePostValue( "ZT_"+"Z16PublicidadId_"+sGXsfl_76_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z16PublicidadId), 4, 0, ",", ""))) ;
            ChangePostValue( "ZT_"+"Z19PublicidadCosto_"+sGXsfl_76_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z19PublicidadCosto), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdDeleted_12_"+sGXsfl_76_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdDeleted_12), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdExists_12_"+sGXsfl_76_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdExists_12), 4, 0, ",", ""))) ;
            ChangePostValue( "nIsMod_12_"+sGXsfl_76_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nIsMod_12), 4, 0, ",", ""))) ;
            if ( nIsMod_12 != 0 )
            {
               ChangePostValue( "PUBLICIDADID_"+sGXsfl_76_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtPublicidadId_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "PUBLICIDADCOSTO_"+sGXsfl_76_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtPublicidadCosto_Enabled), 5, 0, ".", ""))) ;
            }
         }
         /* Start of After( level) rules */
         /* End of After( level) rules */
      }

      protected void ResetCaption070( )
      {
      }

      protected void E11072( )
      {
         /* Start Routine */
         new isauthorized(context ).execute(  AV15Pgmname, out  AV9IsAuthorized) ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV15Pgmname", AV15Pgmname);
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV9IsAuthorized", StringUtil.BoolToStr( AV9IsAuthorized));
         if ( ! AV9IsAuthorized )
         {
            context.wjLoc = formatLink("notauthorized.aspx") + "?" + UrlEncode(StringUtil.RTrim(AV15Pgmname)) ;
         }
         AV10TrnContext.FromXml(AV11WebSession.Get("TrnContext"), "");
         AV12Insert_PeriodistaRespId = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV12Insert_PeriodistaRespId", StringUtil.LTrim( StringUtil.Str( (decimal)(AV12Insert_PeriodistaRespId), 4, 0)));
         AV13Insert_PeriodistaAsisId = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV13Insert_PeriodistaAsisId", StringUtil.LTrim( StringUtil.Str( (decimal)(AV13Insert_PeriodistaAsisId), 4, 0)));
         if ( ( StringUtil.StrCmp(AV10TrnContext.gxTpr_Transactionname, AV15Pgmname) == 0 ) && ( StringUtil.StrCmp(Gx_mode, "INS") == 0 ) )
         {
            AV16GXV1 = 1 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV16GXV1", StringUtil.LTrim( StringUtil.Str( (decimal)(AV16GXV1), 8, 0)));
            while ( AV16GXV1 <= AV10TrnContext.gxTpr_Attributes.Count )
            {
               AV14TrnContextAtt = ((SdtTransactionContext_Attribute)AV10TrnContext.gxTpr_Attributes.Item(AV16GXV1)) ;
               if ( StringUtil.StrCmp(AV14TrnContextAtt.gxTpr_Attributename, "PeriodistaRespId") == 0 )
               {
                  AV12Insert_PeriodistaRespId = (short)(NumberUtil.Val( AV14TrnContextAtt.gxTpr_Attributevalue, ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV12Insert_PeriodistaRespId", StringUtil.LTrim( StringUtil.Str( (decimal)(AV12Insert_PeriodistaRespId), 4, 0)));
               }
               else if ( StringUtil.StrCmp(AV14TrnContextAtt.gxTpr_Attributename, "PeriodistaAsisId") == 0 )
               {
                  AV13Insert_PeriodistaAsisId = (short)(NumberUtil.Val( AV14TrnContextAtt.gxTpr_Attributevalue, ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV13Insert_PeriodistaAsisId", StringUtil.LTrim( StringUtil.Str( (decimal)(AV13Insert_PeriodistaAsisId), 4, 0)));
               }
               AV16GXV1 = (int)(AV16GXV1+1) ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV16GXV1", StringUtil.LTrim( StringUtil.Str( (decimal)(AV16GXV1), 8, 0)));
            }
         }
      }

      protected void E12072( )
      {
         /* After Trn Routine */
         if ( ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 ) && ! AV10TrnContext.gxTpr_Callerondelete )
         {
            context.wjLoc = formatLink("wwguia.aspx")  ;
         }
         context.setWebReturnParms(new Object[] {});
         context.nUserReturn = 1 ;
         returnInSub = true;
         if (true) return;
      }

      protected void ZM078( short GX_JID )
      {
         if ( ( GX_JID == 13 ) || ( GX_JID == 0 ) )
         {
            if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
            {
               Z23GuiaFecha = T00076_A23GuiaFecha[0] ;
               Z24GuiaDescripcion = T00076_A24GuiaDescripcion[0] ;
               Z32PeriodistaRespId = T00076_A32PeriodistaRespId[0] ;
               Z38PeriodistaAsisId = T00076_A38PeriodistaAsisId[0] ;
            }
            else
            {
               Z23GuiaFecha = A23GuiaFecha ;
               Z24GuiaDescripcion = A24GuiaDescripcion ;
               Z32PeriodistaRespId = A32PeriodistaRespId ;
               Z38PeriodistaAsisId = A38PeriodistaAsisId ;
            }
         }
         if ( GX_JID == -13 )
         {
            Z22GuiaId = A22GuiaId ;
            Z23GuiaFecha = A23GuiaFecha ;
            Z24GuiaDescripcion = A24GuiaDescripcion ;
            Z32PeriodistaRespId = A32PeriodistaRespId ;
            Z38PeriodistaAsisId = A38PeriodistaAsisId ;
            Z33PeriodistaRespNom = A33PeriodistaRespNom ;
            Z39PeriodistaAsisNom = A39PeriodistaAsisNom ;
         }
      }

      protected void standaloneNotModal( )
      {
         edtGuiaId_Enabled = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtGuiaId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtGuiaId_Enabled), 5, 0)));
         imgprompt_32_Link = ((StringUtil.StrCmp(Gx_mode, "DSP")==0) ? "" : "javascript:"+"gx.popup.openPrompt('"+"gx00b0.aspx"+"',["+"{Ctrl:gx.dom.el('"+"PERIODISTARESPID"+"'), id:'"+"PERIODISTARESPID"+"'"+",isOut: true}"+"],"+"null"+","+"'', false"+","+"false"+");") ;
         imgprompt_38_Link = ((StringUtil.StrCmp(Gx_mode, "DSP")==0) ? "" : "javascript:"+"gx.popup.openPrompt('"+"gx00b0.aspx"+"',["+"{Ctrl:gx.dom.el('"+"PERIODISTAASISID"+"'), id:'"+"PERIODISTAASISID"+"'"+",isOut: true}"+"],"+"null"+","+"'', false"+","+"false"+");") ;
         edtGuiaId_Enabled = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtGuiaId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtGuiaId_Enabled), 5, 0)));
         imgBtn_delete2_Enabled = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_delete2_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_delete2_Enabled), 5, 0)));
         if ( ! (0==AV7GuiaId) )
         {
            A22GuiaId = AV7GuiaId ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A22GuiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A22GuiaId), 4, 0)));
         }
         if ( ( StringUtil.StrCmp(Gx_mode, "INS") == 0 ) && ! (0==AV12Insert_PeriodistaRespId) )
         {
            edtPeriodistaRespId_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtPeriodistaRespId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtPeriodistaRespId_Enabled), 5, 0)));
         }
         else
         {
            edtPeriodistaRespId_Enabled = 1 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtPeriodistaRespId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtPeriodistaRespId_Enabled), 5, 0)));
         }
         if ( ( StringUtil.StrCmp(Gx_mode, "INS") == 0 ) && ! (0==AV13Insert_PeriodistaAsisId) )
         {
            edtPeriodistaAsisId_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtPeriodistaAsisId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtPeriodistaAsisId_Enabled), 5, 0)));
         }
         else
         {
            edtPeriodistaAsisId_Enabled = 1 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtPeriodistaAsisId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtPeriodistaAsisId_Enabled), 5, 0)));
         }
      }

      protected void standaloneModal( )
      {
         if ( ( StringUtil.StrCmp(Gx_mode, "INS") == 0 ) && ! (0==AV13Insert_PeriodistaAsisId) )
         {
            A38PeriodistaAsisId = AV13Insert_PeriodistaAsisId ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A38PeriodistaAsisId", StringUtil.LTrim( StringUtil.Str( (decimal)(A38PeriodistaAsisId), 4, 0)));
         }
         if ( ( StringUtil.StrCmp(Gx_mode, "INS") == 0 ) && ! (0==AV12Insert_PeriodistaRespId) )
         {
            A32PeriodistaRespId = AV12Insert_PeriodistaRespId ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A32PeriodistaRespId", StringUtil.LTrim( StringUtil.Str( (decimal)(A32PeriodistaRespId), 4, 0)));
         }
         if ( StringUtil.StrCmp(Gx_mode, "DSP") == 0 )
         {
            imgBtn_enter2_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_enter2_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_enter2_Enabled), 5, 0)));
         }
         else
         {
            imgBtn_enter2_Enabled = 1 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_enter2_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_enter2_Enabled), 5, 0)));
         }
         if ( ( StringUtil.StrCmp(Gx_mode, "INS") == 0 ) && ( Gx_BScreen == 0 ) )
         {
            AV15Pgmname = "Guia" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV15Pgmname", AV15Pgmname);
            /* Using cursor T00078 */
            pr_default.execute(6, new Object[] {A38PeriodistaAsisId});
            A39PeriodistaAsisNom = T00078_A39PeriodistaAsisNom[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A39PeriodistaAsisNom", A39PeriodistaAsisNom);
            n39PeriodistaAsisNom = T00078_n39PeriodistaAsisNom[0] ;
            pr_default.close(6);
            /* Using cursor T00077 */
            pr_default.execute(5, new Object[] {A32PeriodistaRespId});
            A33PeriodistaRespNom = T00077_A33PeriodistaRespNom[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A33PeriodistaRespNom", A33PeriodistaRespNom);
            n33PeriodistaRespNom = T00077_n33PeriodistaRespNom[0] ;
            pr_default.close(5);
         }
      }

      protected void Load078( )
      {
         /* Using cursor T00079 */
         pr_default.execute(7, new Object[] {A22GuiaId});
         if ( (pr_default.getStatus(7) != 101) )
         {
            RcdFound8 = 1 ;
            A23GuiaFecha = T00079_A23GuiaFecha[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A23GuiaFecha", context.localUtil.Format(A23GuiaFecha, "99/99/99"));
            A24GuiaDescripcion = T00079_A24GuiaDescripcion[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A24GuiaDescripcion", A24GuiaDescripcion);
            A33PeriodistaRespNom = T00079_A33PeriodistaRespNom[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A33PeriodistaRespNom", A33PeriodistaRespNom);
            n33PeriodistaRespNom = T00079_n33PeriodistaRespNom[0] ;
            A39PeriodistaAsisNom = T00079_A39PeriodistaAsisNom[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A39PeriodistaAsisNom", A39PeriodistaAsisNom);
            n39PeriodistaAsisNom = T00079_n39PeriodistaAsisNom[0] ;
            A32PeriodistaRespId = T00079_A32PeriodistaRespId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A32PeriodistaRespId", StringUtil.LTrim( StringUtil.Str( (decimal)(A32PeriodistaRespId), 4, 0)));
            A38PeriodistaAsisId = T00079_A38PeriodistaAsisId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A38PeriodistaAsisId", StringUtil.LTrim( StringUtil.Str( (decimal)(A38PeriodistaAsisId), 4, 0)));
            ZM078( -13) ;
         }
         pr_default.close(7);
         OnLoadActions078( ) ;
      }

      protected void OnLoadActions078( )
      {
         AV15Pgmname = "Guia" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV15Pgmname", AV15Pgmname);
      }

      protected void CheckExtendedTable078( )
      {
         Gx_BScreen = 1 ;
         standaloneModal( ) ;
         AV15Pgmname = "Guia" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV15Pgmname", AV15Pgmname);
         if ( ! ( (DateTime.MinValue==A23GuiaFecha) || ( A23GuiaFecha >= context.localUtil.YMDToD( 1753, 1, 1) ) ) )
         {
            GX_msglist.addItem("Campo Guia Fecha fuera de rango", "OutOfRange", 1, "GUIAFECHA");
            AnyError = 1 ;
            GX_FocusControl = edtGuiaFecha_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         /* Using cursor T00077 */
         pr_default.execute(5, new Object[] {A32PeriodistaRespId});
         if ( (pr_default.getStatus(5) == 101) )
         {
            AnyError32 = 1 ;
            GX_msglist.addItem("No existe 'Periodista Resp'.", "ForeignKeyNotFound", 1, "PERIODISTARESPID");
            AnyError = 1 ;
            GX_FocusControl = edtPeriodistaRespId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError32 == 0 )
         {
            A33PeriodistaRespNom = T00077_A33PeriodistaRespNom[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A33PeriodistaRespNom", A33PeriodistaRespNom);
            n33PeriodistaRespNom = T00077_n33PeriodistaRespNom[0] ;
         }
         pr_default.close(5);
         if ( A38PeriodistaAsisId == A32PeriodistaRespId )
         {
            GX_msglist.addItem("Los periodistas no pueden ser iguales", 1, "PERIODISTARESPID");
            AnyError = 1 ;
            GX_FocusControl = edtPeriodistaRespId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         /* Using cursor T00078 */
         pr_default.execute(6, new Object[] {A38PeriodistaAsisId});
         if ( (pr_default.getStatus(6) == 101) )
         {
            AnyError38 = 1 ;
            GX_msglist.addItem("No existe 'Periodista Asis'.", "ForeignKeyNotFound", 1, "PERIODISTAASISID");
            AnyError = 1 ;
            GX_FocusControl = edtPeriodistaAsisId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError38 == 0 )
         {
            A39PeriodistaAsisNom = T00078_A39PeriodistaAsisNom[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A39PeriodistaAsisNom", A39PeriodistaAsisNom);
            n39PeriodistaAsisNom = T00078_n39PeriodistaAsisNom[0] ;
         }
         pr_default.close(6);
      }

      protected void CloseExtendedTableCursors078( )
      {
         pr_default.close(5);
         pr_default.close(6);
      }

      protected void enableDisable( )
      {
      }

      protected void gxLoad_14( short A32PeriodistaRespId )
      {
         /* Using cursor T000710 */
         pr_default.execute(8, new Object[] {A32PeriodistaRespId});
         if ( (pr_default.getStatus(8) == 101) )
         {
            AnyError32 = 1 ;
            GX_msglist.addItem("No existe 'Periodista Resp'.", "ForeignKeyNotFound", 1, "PERIODISTARESPID");
            AnyError = 1 ;
            GX_FocusControl = edtPeriodistaRespId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError32 == 0 )
         {
            A33PeriodistaRespNom = T000710_A33PeriodistaRespNom[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A33PeriodistaRespNom", A33PeriodistaRespNom);
            n33PeriodistaRespNom = T000710_n33PeriodistaRespNom[0] ;
         }
         GxWebStd.set_html_headers( context, 0, "", "");
         context.GX_webresponse.AddString("new Array( new Array(");
         context.GX_webresponse.AddString("\""+GXUtil.EncodeJSConstant( StringUtil.RTrim( A33PeriodistaRespNom))+"\"");
         context.GX_webresponse.AddString(")");
         if ( (pr_default.getStatus(8) == 101) )
         {
            context.GX_webresponse.AddString(",");
            context.GX_webresponse.AddString("101");
         }
         context.GX_webresponse.AddString(")");
         pr_default.close(8);
      }

      protected void gxLoad_15( short A38PeriodistaAsisId )
      {
         /* Using cursor T000711 */
         pr_default.execute(9, new Object[] {A38PeriodistaAsisId});
         if ( (pr_default.getStatus(9) == 101) )
         {
            AnyError38 = 1 ;
            GX_msglist.addItem("No existe 'Periodista Asis'.", "ForeignKeyNotFound", 1, "PERIODISTAASISID");
            AnyError = 1 ;
            GX_FocusControl = edtPeriodistaAsisId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError38 == 0 )
         {
            A39PeriodistaAsisNom = T000711_A39PeriodistaAsisNom[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A39PeriodistaAsisNom", A39PeriodistaAsisNom);
            n39PeriodistaAsisNom = T000711_n39PeriodistaAsisNom[0] ;
         }
         GxWebStd.set_html_headers( context, 0, "", "");
         context.GX_webresponse.AddString("new Array( new Array(");
         context.GX_webresponse.AddString("\""+GXUtil.EncodeJSConstant( StringUtil.RTrim( A39PeriodistaAsisNom))+"\"");
         context.GX_webresponse.AddString(")");
         if ( (pr_default.getStatus(9) == 101) )
         {
            context.GX_webresponse.AddString(",");
            context.GX_webresponse.AddString("101");
         }
         context.GX_webresponse.AddString(")");
         pr_default.close(9);
      }

      protected void GetKey078( )
      {
         /* Using cursor T000712 */
         pr_default.execute(10, new Object[] {A22GuiaId});
         if ( (pr_default.getStatus(10) != 101) )
         {
            RcdFound8 = 1 ;
         }
         else
         {
            RcdFound8 = 0 ;
         }
         pr_default.close(10);
      }

      protected void getByPrimaryKey( )
      {
         /* Using cursor T00076 */
         pr_default.execute(4, new Object[] {A22GuiaId});
         if ( (pr_default.getStatus(4) != 101) )
         {
            ZM078( 13) ;
            RcdFound8 = 1 ;
            A22GuiaId = T00076_A22GuiaId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A22GuiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A22GuiaId), 4, 0)));
            A23GuiaFecha = T00076_A23GuiaFecha[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A23GuiaFecha", context.localUtil.Format(A23GuiaFecha, "99/99/99"));
            A24GuiaDescripcion = T00076_A24GuiaDescripcion[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A24GuiaDescripcion", A24GuiaDescripcion);
            A32PeriodistaRespId = T00076_A32PeriodistaRespId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A32PeriodistaRespId", StringUtil.LTrim( StringUtil.Str( (decimal)(A32PeriodistaRespId), 4, 0)));
            A38PeriodistaAsisId = T00076_A38PeriodistaAsisId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A38PeriodistaAsisId", StringUtil.LTrim( StringUtil.Str( (decimal)(A38PeriodistaAsisId), 4, 0)));
            Z22GuiaId = A22GuiaId ;
            sMode8 = Gx_mode ;
            Gx_mode = "" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            Load078( ) ;
            Gx_mode = sMode8 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         else
         {
            RcdFound8 = 0 ;
            InitializeNonKey078( ) ;
            sMode8 = Gx_mode ;
            Gx_mode = "" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            standaloneModal( ) ;
            Gx_mode = sMode8 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         pr_default.close(4);
      }

      protected void getEqualNoModal( )
      {
         GetKey078( ) ;
         if ( RcdFound8 == 0 )
         {
         }
         else
         {
         }
         getByPrimaryKey( ) ;
      }

      protected void move_next( )
      {
         RcdFound8 = 0 ;
         /* Using cursor T000713 */
         pr_default.execute(11, new Object[] {A22GuiaId});
         if ( (pr_default.getStatus(11) != 101) )
         {
            while ( (pr_default.getStatus(11) != 101) && ( ( T000713_A22GuiaId[0] < A22GuiaId ) ) )
            {
               pr_default.readNext(11);
            }
            if ( (pr_default.getStatus(11) != 101) && ( ( T000713_A22GuiaId[0] > A22GuiaId ) ) )
            {
               A22GuiaId = T000713_A22GuiaId[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A22GuiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A22GuiaId), 4, 0)));
               RcdFound8 = 1 ;
            }
         }
         pr_default.close(4);
      }

      protected void move_previous( )
      {
         RcdFound8 = 0 ;
         /* Using cursor T000714 */
         pr_default.execute(12, new Object[] {A22GuiaId});
         if ( (pr_default.getStatus(12) != 101) )
         {
            while ( (pr_default.getStatus(12) != 101) && ( ( T000714_A22GuiaId[0] > A22GuiaId ) ) )
            {
               pr_default.readNext(12);
            }
            if ( (pr_default.getStatus(12) != 101) && ( ( T000714_A22GuiaId[0] < A22GuiaId ) ) )
            {
               A22GuiaId = T000714_A22GuiaId[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A22GuiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A22GuiaId), 4, 0)));
               RcdFound8 = 1 ;
            }
         }
         pr_default.close(3);
      }

      protected void btn_enter( )
      {
         nKeyPressed = 1 ;
         GetKey078( ) ;
         if ( RcdFound8 == 1 )
         {
            if ( StringUtil.StrCmp(Gx_mode, "INS") == 0 )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_noupdate", ""), "DuplicatePrimaryKey", 1, "GUIAID");
               AnyError = 1 ;
            }
            else if ( A22GuiaId != Z22GuiaId )
            {
               A22GuiaId = Z22GuiaId ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A22GuiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A22GuiaId), 4, 0)));
               GX_msglist.addItem(context.GetMessage( "GXM_getbeforeupd", ""), "CandidateKeyNotFound", 1, "GUIAID");
               AnyError = 1 ;
            }
            else if ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 )
            {
               delete( ) ;
               AfterTrn( ) ;
               GX_FocusControl = edtGuiaFecha_Internalname ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
            }
            else
            {
               /* Update record */
               Update078( ) ;
               GX_FocusControl = edtGuiaFecha_Internalname ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
            }
         }
         else
         {
            if ( A22GuiaId != Z22GuiaId )
            {
               /* Insert record */
               GX_FocusControl = edtGuiaFecha_Internalname ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
               Insert078( ) ;
               if ( AnyError == 1 )
               {
                  GX_FocusControl = "" ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
               }
            }
            else
            {
               if ( StringUtil.StrCmp(Gx_mode, "UPD") == 0 )
               {
                  GX_msglist.addItem(context.GetMessage( "GXM_recdeleted", ""), 1, "GUIAID");
                  AnyError = 1 ;
               }
               else
               {
                  /* Insert record */
                  GX_FocusControl = edtGuiaFecha_Internalname ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  Insert078( ) ;
                  if ( AnyError == 1 )
                  {
                     GX_FocusControl = "" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  }
               }
            }
         }
         AfterTrn( ) ;
         if ( ( StringUtil.StrCmp(Gx_mode, "UPD") == 0 ) || ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 ) )
         {
            if ( AnyError == 0 )
            {
               context.nUserReturn = 1 ;
            }
         }
      }

      protected void btn_delete( )
      {
         if ( A22GuiaId != Z22GuiaId )
         {
            A22GuiaId = Z22GuiaId ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A22GuiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A22GuiaId), 4, 0)));
            GX_msglist.addItem(context.GetMessage( "GXM_getbeforedlt", ""), 1, "GUIAID");
            AnyError = 1 ;
         }
         else
         {
            delete( ) ;
            AfterTrn( ) ;
            GX_FocusControl = edtGuiaFecha_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError != 0 )
         {
         }
      }

      protected void CheckOptimisticConcurrency078( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            /* Using cursor T000715 */
            pr_default.execute(13, new Object[] {A22GuiaId});
            if ( (pr_default.getStatus(13) == 103) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_lock", new   object[]  {"Guia"}), "RecordIsLocked", 1, "");
               AnyError = 1 ;
               return  ;
            }
            if ( (pr_default.getStatus(13) == 101) || ( Z23GuiaFecha != T000715_A23GuiaFecha[0] ) || ( StringUtil.StrCmp(Z24GuiaDescripcion, T000715_A24GuiaDescripcion[0]) != 0 ) || ( Z32PeriodistaRespId != T000715_A32PeriodistaRespId[0] ) || ( Z38PeriodistaAsisId != T000715_A38PeriodistaAsisId[0] ) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_waschg", new   object[]  {"Guia"}), "RecordWasChanged", 1, "");
               AnyError = 1 ;
               return  ;
            }
         }
      }

      protected void Insert078( )
      {
         BeforeValidate078( ) ;
         if ( AnyError == 0 )
         {
            CheckExtendedTable078( ) ;
         }
         if ( AnyError == 0 )
         {
            ZM078( 0) ;
            CheckOptimisticConcurrency078( ) ;
            if ( AnyError == 0 )
            {
               AfterConfirm078( ) ;
               if ( AnyError == 0 )
               {
                  BeforeInsert078( ) ;
                  if ( AnyError == 0 )
                  {
                     /* Using cursor T000716 */
                     pr_default.execute(14, new Object[] {A23GuiaFecha, A24GuiaDescripcion, A32PeriodistaRespId, A38PeriodistaAsisId});
                     pr_default.close(14);
                     /* Retrieving last key number assigned */
                     /* Using cursor T000717 */
                     pr_default.execute(15);
                     A22GuiaId = T000717_A22GuiaId[0] ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A22GuiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A22GuiaId), 4, 0)));
                     pr_default.close(15);
                     dsDefault.SmartCacheProvider.SetUpdated("Guia") ;
                     if ( AnyError == 0 )
                     {
                        /* Start of After( Insert) rules */
                        /* End of After( Insert) rules */
                        if ( AnyError == 0 )
                        {
                           ProcessLevel078( ) ;
                           if ( AnyError == 0 )
                           {
                              /* Save values for previous() function. */
                              GX_msglist.addItem(context.GetMessage( "GXM_sucadded", ""), 0, "");
                              ResetCaption070( ) ;
                           }
                        }
                     }
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_unexp", ""), 1, "");
                     AnyError = 1 ;
                  }
               }
            }
            else
            {
               Load078( ) ;
            }
            EndLevel078( ) ;
         }
         CloseExtendedTableCursors078( ) ;
      }

      protected void Update078( )
      {
         BeforeValidate078( ) ;
         if ( AnyError == 0 )
         {
            CheckExtendedTable078( ) ;
         }
         if ( AnyError == 0 )
         {
            CheckOptimisticConcurrency078( ) ;
            if ( AnyError == 0 )
            {
               AfterConfirm078( ) ;
               if ( AnyError == 0 )
               {
                  BeforeUpdate078( ) ;
                  if ( AnyError == 0 )
                  {
                     /* Using cursor T000718 */
                     pr_default.execute(16, new Object[] {A23GuiaFecha, A24GuiaDescripcion, A32PeriodistaRespId, A38PeriodistaAsisId, A22GuiaId});
                     pr_default.close(16);
                     dsDefault.SmartCacheProvider.SetUpdated("Guia") ;
                     if ( (pr_default.getStatus(16) == 103) )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_lock", new   object[]  {"Guia"}), "RecordIsLocked", 1, "");
                        AnyError = 1 ;
                     }
                     DeferredUpdate078( ) ;
                     if ( AnyError == 0 )
                     {
                        /* Start of After( update) rules */
                        /* End of After( update) rules */
                        if ( AnyError == 0 )
                        {
                           ProcessLevel078( ) ;
                           if ( AnyError == 0 )
                           {
                              if ( ( StringUtil.StrCmp(Gx_mode, "UPD") == 0 ) || ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 ) )
                              {
                                 if ( AnyError == 0 )
                                 {
                                    context.nUserReturn = 1 ;
                                 }
                              }
                           }
                        }
                     }
                     else
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_unexp", ""), 1, "");
                        AnyError = 1 ;
                     }
                  }
               }
            }
            EndLevel078( ) ;
         }
         CloseExtendedTableCursors078( ) ;
      }

      protected void DeferredUpdate078( )
      {
      }

      protected void delete( )
      {
         BeforeValidate078( ) ;
         if ( AnyError == 0 )
         {
            CheckOptimisticConcurrency078( ) ;
         }
         if ( AnyError == 0 )
         {
            OnDeleteControls078( ) ;
            AfterConfirm078( ) ;
            if ( AnyError == 0 )
            {
               BeforeDelete078( ) ;
               if ( AnyError == 0 )
               {
                  ScanStart0712( ) ;
                  while ( RcdFound12 != 0 )
                  {
                     getByPrimaryKey0712( ) ;
                     Delete0712( ) ;
                     ScanNext0712( ) ;
                  }
                  ScanEnd0712( ) ;
                  if ( AnyError == 0 )
                  {
                     /* Using cursor T000719 */
                     pr_default.execute(17, new Object[] {A22GuiaId});
                     pr_default.close(17);
                     dsDefault.SmartCacheProvider.SetUpdated("Guia") ;
                     if ( AnyError == 0 )
                     {
                        /* Start of After( delete) rules */
                        /* End of After( delete) rules */
                        if ( AnyError == 0 )
                        {
                           if ( ( StringUtil.StrCmp(Gx_mode, "UPD") == 0 ) || ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 ) )
                           {
                              if ( AnyError == 0 )
                              {
                                 context.nUserReturn = 1 ;
                              }
                           }
                        }
                     }
                     else
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_unexp", ""), 1, "");
                        AnyError = 1 ;
                     }
                  }
               }
            }
         }
         sMode8 = Gx_mode ;
         Gx_mode = "DLT" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         EndLevel078( ) ;
         Gx_mode = sMode8 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
      }

      protected void OnDeleteControls078( )
      {
         standaloneModal( ) ;
         if ( AnyError == 0 )
         {
            /* Delete mode formulas */
            AV15Pgmname = "Guia" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV15Pgmname", AV15Pgmname);
            /* Using cursor T000720 */
            pr_default.execute(18, new Object[] {A32PeriodistaRespId});
            A33PeriodistaRespNom = T000720_A33PeriodistaRespNom[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A33PeriodistaRespNom", A33PeriodistaRespNom);
            n33PeriodistaRespNom = T000720_n33PeriodistaRespNom[0] ;
            pr_default.close(18);
            /* Using cursor T000721 */
            pr_default.execute(19, new Object[] {A38PeriodistaAsisId});
            A39PeriodistaAsisNom = T000721_A39PeriodistaAsisNom[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A39PeriodistaAsisNom", A39PeriodistaAsisNom);
            n39PeriodistaAsisNom = T000721_n39PeriodistaAsisNom[0] ;
            pr_default.close(19);
         }
      }

      protected void ProcessNestedLevel0712( )
      {
         nGXsfl_76_idx = 0 ;
         while ( nGXsfl_76_idx < nRC_Gridguia_publicidad )
         {
            ReadRow0712( ) ;
            if ( ( nRcdExists_12 != 0 ) || ( nIsMod_12 != 0 ) )
            {
               standaloneNotModal0712( ) ;
               GetKey0712( ) ;
               if ( ( nRcdExists_12 == 0 ) && ( nRcdDeleted_12 == 0 ) )
               {
                  if ( RcdFound12 == 0 )
                  {
                     Gx_mode = "INS" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                     Insert0712( ) ;
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_noupdate", ""), "DuplicatePrimaryKey", 1, "PUBLICIDADID");
                     AnyError = 1 ;
                     GX_FocusControl = edtPublicidadId_Internalname ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  }
               }
               else
               {
                  if ( RcdFound12 != 0 )
                  {
                     if ( ( nRcdDeleted_12 != 0 ) && ( nRcdExists_12 != 0 ) )
                     {
                        Gx_mode = "DLT" ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                        Delete0712( ) ;
                     }
                     else
                     {
                        if ( ( nIsMod_12 != 0 ) && ( nRcdExists_12 != 0 ) )
                        {
                           Gx_mode = "UPD" ;
                           context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                           Update0712( ) ;
                        }
                     }
                  }
                  else
                  {
                     if ( nRcdDeleted_12 == 0 )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_recdeleted", ""), 1, "PUBLICIDADID");
                        AnyError = 1 ;
                        GX_FocusControl = edtPublicidadId_Internalname ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                     }
                  }
               }
            }
            ChangePostValue( edtPublicidadId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A16PublicidadId), 4, 0, ",", ""))) ;
            ChangePostValue( edtPublicidadCosto_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A19PublicidadCosto), 4, 0, ",", ""))) ;
            ChangePostValue( "ZT_"+"Z16PublicidadId_"+sGXsfl_76_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z16PublicidadId), 4, 0, ",", ""))) ;
            ChangePostValue( "ZT_"+"Z19PublicidadCosto_"+sGXsfl_76_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z19PublicidadCosto), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdDeleted_12_"+sGXsfl_76_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdDeleted_12), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdExists_12_"+sGXsfl_76_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdExists_12), 4, 0, ",", ""))) ;
            ChangePostValue( "nIsMod_12_"+sGXsfl_76_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nIsMod_12), 4, 0, ",", ""))) ;
            if ( nIsMod_12 != 0 )
            {
               ChangePostValue( "PUBLICIDADID_"+sGXsfl_76_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtPublicidadId_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "PUBLICIDADCOSTO_"+sGXsfl_76_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtPublicidadCosto_Enabled), 5, 0, ".", ""))) ;
            }
         }
         /* Start of After( level) rules */
         /* End of After( level) rules */
         InitAll0712( ) ;
         if ( AnyError != 0 )
         {
         }
         nRcdExists_12 = 0 ;
         nIsMod_12 = 0 ;
         nRcdDeleted_12 = 0 ;
      }

      protected void ProcessLevel078( )
      {
         /* Save parent mode. */
         sMode8 = Gx_mode ;
         ProcessNestedLevel0712( ) ;
         if ( AnyError != 0 )
         {
         }
         /* Restore parent mode. */
         Gx_mode = sMode8 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         /* ' Update level parameters */
      }

      protected void EndLevel078( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            pr_default.close(13);
         }
         if ( AnyError == 0 )
         {
            BeforeComplete078( ) ;
         }
         if ( AnyError == 0 )
         {
            pr_default.close(12);
            pr_default.close(11);
            pr_default.close(1);
            pr_default.close(0);
            pr_default.close(18);
            pr_default.close(19);
            pr_default.close(2);
            context.CommitDataStores("Guia");
            if ( AnyError == 0 )
            {
               ConfirmValues070( ) ;
            }
            /* After transaction rules */
            /* Execute 'After Trn' event if defined. */
            trnEnded = 1 ;
         }
         else
         {
            pr_default.close(12);
            pr_default.close(11);
            pr_default.close(1);
            pr_default.close(0);
            pr_default.close(18);
            pr_default.close(19);
            pr_default.close(2);
            context.RollbackDataStores("Guia");
         }
         IsModified = 0 ;
         if ( AnyError != 0 )
         {
            context.wjLoc = "" ;
            context.nUserReturn = 0 ;
         }
      }

      public void ScanStart078( )
      {
         /* Scan By routine */
         /* Using cursor T000722 */
         pr_default.execute(20);
         RcdFound8 = 0 ;
         if ( (pr_default.getStatus(20) != 101) )
         {
            RcdFound8 = 1 ;
            A22GuiaId = T000722_A22GuiaId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A22GuiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A22GuiaId), 4, 0)));
         }
         /* Load Subordinate Levels */
      }

      protected void ScanNext078( )
      {
         /* Scan next routine */
         pr_default.readNext(20);
         RcdFound8 = 0 ;
         if ( (pr_default.getStatus(20) != 101) )
         {
            RcdFound8 = 1 ;
            A22GuiaId = T000722_A22GuiaId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A22GuiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A22GuiaId), 4, 0)));
         }
      }

      protected void ScanEnd078( )
      {
      }

      protected void AfterConfirm078( )
      {
         /* After Confirm Rules */
      }

      protected void BeforeInsert078( )
      {
         /* Before Insert Rules */
      }

      protected void BeforeUpdate078( )
      {
         /* Before Update Rules */
      }

      protected void BeforeDelete078( )
      {
         /* Before Delete Rules */
      }

      protected void BeforeComplete078( )
      {
         /* Before Complete Rules */
      }

      protected void BeforeValidate078( )
      {
         /* Before Validate Rules */
      }

      protected void DisableAttributes078( )
      {
         edtGuiaId_Enabled = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtGuiaId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtGuiaId_Enabled), 5, 0)));
         edtGuiaFecha_Enabled = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtGuiaFecha_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtGuiaFecha_Enabled), 5, 0)));
         edtGuiaDescripcion_Enabled = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtGuiaDescripcion_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtGuiaDescripcion_Enabled), 5, 0)));
         edtPeriodistaRespId_Enabled = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtPeriodistaRespId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtPeriodistaRespId_Enabled), 5, 0)));
         edtPeriodistaRespNom_Enabled = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtPeriodistaRespNom_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtPeriodistaRespNom_Enabled), 5, 0)));
         edtPeriodistaAsisId_Enabled = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtPeriodistaAsisId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtPeriodistaAsisId_Enabled), 5, 0)));
         edtPeriodistaAsisNom_Enabled = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtPeriodistaAsisNom_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtPeriodistaAsisNom_Enabled), 5, 0)));
      }

      protected void ZM0712( short GX_JID )
      {
         if ( ( GX_JID == 16 ) || ( GX_JID == 0 ) )
         {
            if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
            {
               Z19PublicidadCosto = T00073_A19PublicidadCosto[0] ;
            }
            else
            {
               Z19PublicidadCosto = A19PublicidadCosto ;
            }
         }
         if ( GX_JID == -16 )
         {
            Z22GuiaId = A22GuiaId ;
            Z19PublicidadCosto = A19PublicidadCosto ;
            Z16PublicidadId = A16PublicidadId ;
         }
      }

      protected void standaloneNotModal0712( )
      {
      }

      protected void standaloneModal0712( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            edtPublicidadId_Enabled = 0 ;
         }
         else
         {
            edtPublicidadId_Enabled = 1 ;
         }
         if ( ( StringUtil.StrCmp(Gx_mode, "DSP") == 0 ) || ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 ) )
         {
            DisableAttributes0712( ) ;
         }
      }

      protected void Load0712( )
      {
         /* Using cursor T000723 */
         pr_default.execute(21, new Object[] {A22GuiaId, A16PublicidadId});
         if ( (pr_default.getStatus(21) != 101) )
         {
            RcdFound12 = 1 ;
            A19PublicidadCosto = T000723_A19PublicidadCosto[0] ;
            ZM0712( -16) ;
         }
         pr_default.close(21);
         OnLoadActions0712( ) ;
      }

      protected void OnLoadActions0712( )
      {
      }

      protected void CheckExtendedTable0712( )
      {
         Gx_BScreen = 1 ;
         standaloneModal0712( ) ;
         /* Using cursor T00074 */
         pr_default.execute(2, new Object[] {A16PublicidadId});
         if ( (pr_default.getStatus(2) == 101) )
         {
            AnyError16 = 1 ;
            GX_msglist.addItem("No existe 'Publicidad'.", "ForeignKeyNotFound", 1, "PUBLICIDADID");
            AnyError = 1 ;
            GX_FocusControl = edtPublicidadId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError16 == 0 )
         {
         }
         pr_default.close(2);
      }

      protected void CloseExtendedTableCursors0712( )
      {
         pr_default.close(2);
      }

      protected void enableDisable0712( )
      {
      }

      protected void gxLoad_17( short A16PublicidadId )
      {
         /* Using cursor T000724 */
         pr_default.execute(22, new Object[] {A16PublicidadId});
         if ( (pr_default.getStatus(22) == 101) )
         {
            AnyError16 = 1 ;
            GX_msglist.addItem("No existe 'Publicidad'.", "ForeignKeyNotFound", 1, "PUBLICIDADID");
            AnyError = 1 ;
            GX_FocusControl = edtPublicidadId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError16 == 0 )
         {
         }
         GxWebStd.set_html_headers( context, 0, "", "");
         context.GX_webresponse.AddString("new Array( new Array(");
         context.GX_webresponse.AddString("");
         context.GX_webresponse.AddString(")");
         if ( (pr_default.getStatus(22) == 101) )
         {
            context.GX_webresponse.AddString(",");
            context.GX_webresponse.AddString("101");
         }
         context.GX_webresponse.AddString(")");
         pr_default.close(22);
      }

      protected void GetKey0712( )
      {
         /* Using cursor T000725 */
         pr_default.execute(23, new Object[] {A22GuiaId, A16PublicidadId});
         if ( (pr_default.getStatus(23) != 101) )
         {
            RcdFound12 = 1 ;
         }
         else
         {
            RcdFound12 = 0 ;
         }
         pr_default.close(23);
      }

      protected void getByPrimaryKey0712( )
      {
         /* Using cursor T00073 */
         pr_default.execute(1, new Object[] {A22GuiaId, A16PublicidadId});
         if ( (pr_default.getStatus(1) != 101) )
         {
            ZM0712( 16) ;
            RcdFound12 = 1 ;
            InitializeNonKey0712( ) ;
            A19PublicidadCosto = T00073_A19PublicidadCosto[0] ;
            A16PublicidadId = T00073_A16PublicidadId[0] ;
            Z22GuiaId = A22GuiaId ;
            Z16PublicidadId = A16PublicidadId ;
            sMode12 = Gx_mode ;
            Gx_mode = "" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            Load0712( ) ;
            Gx_mode = sMode12 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         else
         {
            RcdFound12 = 0 ;
            InitializeNonKey0712( ) ;
            sMode12 = Gx_mode ;
            Gx_mode = "" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            standaloneModal0712( ) ;
            Gx_mode = sMode12 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         pr_default.close(1);
      }

      protected void CheckOptimisticConcurrency0712( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            /* Using cursor T00072 */
            pr_default.execute(0, new Object[] {A22GuiaId, A16PublicidadId});
            if ( (pr_default.getStatus(0) == 103) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_lock", new   object[]  {"GuiaPublicidad"}), "RecordIsLocked", 1, "");
               AnyError = 1 ;
               return  ;
            }
            if ( (pr_default.getStatus(0) == 101) || ( Z19PublicidadCosto != T00072_A19PublicidadCosto[0] ) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_waschg", new   object[]  {"GuiaPublicidad"}), "RecordWasChanged", 1, "");
               AnyError = 1 ;
               return  ;
            }
         }
      }

      protected void Insert0712( )
      {
         BeforeValidate0712( ) ;
         if ( AnyError == 0 )
         {
            CheckExtendedTable0712( ) ;
         }
         if ( AnyError == 0 )
         {
            ZM0712( 0) ;
            CheckOptimisticConcurrency0712( ) ;
            if ( AnyError == 0 )
            {
               AfterConfirm0712( ) ;
               if ( AnyError == 0 )
               {
                  BeforeInsert0712( ) ;
                  if ( AnyError == 0 )
                  {
                     /* Using cursor T000726 */
                     pr_default.execute(24, new Object[] {A22GuiaId, A19PublicidadCosto, A16PublicidadId});
                     pr_default.close(24);
                     dsDefault.SmartCacheProvider.SetUpdated("GuiaPublicidad") ;
                     if ( (pr_default.getStatus(24) == 1) )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_noupdate", ""), "DuplicatePrimaryKey", 1, "");
                        AnyError = 1 ;
                     }
                     if ( AnyError == 0 )
                     {
                        /* Start of After( Insert) rules */
                        /* End of After( Insert) rules */
                        if ( AnyError == 0 )
                        {
                           /* Save values for previous() function. */
                        }
                     }
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_unexp", ""), 1, "");
                     AnyError = 1 ;
                  }
               }
            }
            else
            {
               Load0712( ) ;
            }
            EndLevel0712( ) ;
         }
         CloseExtendedTableCursors0712( ) ;
      }

      protected void Update0712( )
      {
         BeforeValidate0712( ) ;
         if ( AnyError == 0 )
         {
            CheckExtendedTable0712( ) ;
         }
         if ( AnyError == 0 )
         {
            CheckOptimisticConcurrency0712( ) ;
            if ( AnyError == 0 )
            {
               AfterConfirm0712( ) ;
               if ( AnyError == 0 )
               {
                  BeforeUpdate0712( ) ;
                  if ( AnyError == 0 )
                  {
                     /* Using cursor T000727 */
                     pr_default.execute(25, new Object[] {A19PublicidadCosto, A22GuiaId, A16PublicidadId});
                     pr_default.close(25);
                     dsDefault.SmartCacheProvider.SetUpdated("GuiaPublicidad") ;
                     if ( (pr_default.getStatus(25) == 103) )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_lock", new   object[]  {"GuiaPublicidad"}), "RecordIsLocked", 1, "");
                        AnyError = 1 ;
                     }
                     DeferredUpdate0712( ) ;
                     if ( AnyError == 0 )
                     {
                        /* Start of After( update) rules */
                        /* End of After( update) rules */
                        if ( AnyError == 0 )
                        {
                           getByPrimaryKey0712( ) ;
                        }
                     }
                     else
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_unexp", ""), 1, "");
                        AnyError = 1 ;
                     }
                  }
               }
            }
            EndLevel0712( ) ;
         }
         CloseExtendedTableCursors0712( ) ;
      }

      protected void DeferredUpdate0712( )
      {
      }

      protected void Delete0712( )
      {
         Gx_mode = "DLT" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         BeforeValidate0712( ) ;
         if ( AnyError == 0 )
         {
            CheckOptimisticConcurrency0712( ) ;
         }
         if ( AnyError == 0 )
         {
            OnDeleteControls0712( ) ;
            AfterConfirm0712( ) ;
            if ( AnyError == 0 )
            {
               BeforeDelete0712( ) ;
               if ( AnyError == 0 )
               {
                  /* No cascading delete specified. */
                  /* Using cursor T000728 */
                  pr_default.execute(26, new Object[] {A22GuiaId, A16PublicidadId});
                  pr_default.close(26);
                  dsDefault.SmartCacheProvider.SetUpdated("GuiaPublicidad") ;
                  if ( AnyError == 0 )
                  {
                     /* Start of After( delete) rules */
                     /* End of After( delete) rules */
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_unexp", ""), 1, "");
                     AnyError = 1 ;
                  }
               }
            }
         }
         sMode12 = Gx_mode ;
         Gx_mode = "DLT" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         EndLevel0712( ) ;
         Gx_mode = sMode12 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
      }

      protected void OnDeleteControls0712( )
      {
         standaloneModal0712( ) ;
         /* No delete mode formulas found. */
      }

      protected void EndLevel0712( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            pr_default.close(0);
         }
         if ( AnyError != 0 )
         {
            context.wjLoc = "" ;
            context.nUserReturn = 0 ;
         }
      }

      public void ScanStart0712( )
      {
         /* Scan By routine */
         /* Using cursor T000729 */
         pr_default.execute(27, new Object[] {A22GuiaId});
         RcdFound12 = 0 ;
         if ( (pr_default.getStatus(27) != 101) )
         {
            RcdFound12 = 1 ;
            A16PublicidadId = T000729_A16PublicidadId[0] ;
         }
         /* Load Subordinate Levels */
      }

      protected void ScanNext0712( )
      {
         /* Scan next routine */
         pr_default.readNext(27);
         RcdFound12 = 0 ;
         if ( (pr_default.getStatus(27) != 101) )
         {
            RcdFound12 = 1 ;
            A16PublicidadId = T000729_A16PublicidadId[0] ;
         }
      }

      protected void ScanEnd0712( )
      {
         pr_default.close(1);
      }

      protected void AfterConfirm0712( )
      {
         /* After Confirm Rules */
      }

      protected void BeforeInsert0712( )
      {
         /* Before Insert Rules */
      }

      protected void BeforeUpdate0712( )
      {
         /* Before Update Rules */
      }

      protected void BeforeDelete0712( )
      {
         /* Before Delete Rules */
      }

      protected void BeforeComplete0712( )
      {
         /* Before Complete Rules */
      }

      protected void BeforeValidate0712( )
      {
         /* Before Validate Rules */
      }

      protected void DisableAttributes0712( )
      {
         edtPublicidadId_Enabled = 0 ;
         edtPublicidadCosto_Enabled = 0 ;
      }

      protected void AddRow0712( )
      {
         nGXsfl_76_idx = (short)(nGXsfl_76_idx+1) ;
         sGXsfl_76_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_76_idx), 4, 0)), 4, "0") ;
         edtPublicidadId_Internalname = "PUBLICIDADID_"+sGXsfl_76_idx ;
         imgprompt_16_Internalname = "PROMPT_16_"+sGXsfl_76_idx ;
         edtPublicidadCosto_Internalname = "PUBLICIDADCOSTO_"+sGXsfl_76_idx ;
         SendRow0712( ) ;
      }

      protected void SendRow0712( )
      {
         Gridguia_publicidadRow = GXWebRow.GetNew(context) ;
         if ( subGridguia_publicidad_Backcolorstyle == 0 )
         {
            /* None style subfile background logic. */
            subGridguia_publicidad_Backstyle = 0 ;
            if ( StringUtil.StrCmp(subGridguia_publicidad_Class, "") != 0 )
            {
               subGridguia_publicidad_Linesclass = subGridguia_publicidad_Class+"Odd" ;
            }
         }
         else if ( subGridguia_publicidad_Backcolorstyle == 1 )
         {
            /* Uniform style subfile background logic. */
            subGridguia_publicidad_Backstyle = 0 ;
            subGridguia_publicidad_Backcolor = subGridguia_publicidad_Allbackcolor ;
            if ( StringUtil.StrCmp(subGridguia_publicidad_Class, "") != 0 )
            {
               subGridguia_publicidad_Linesclass = subGridguia_publicidad_Class+"Uniform" ;
            }
         }
         else if ( subGridguia_publicidad_Backcolorstyle == 2 )
         {
            /* Header style subfile background logic. */
            subGridguia_publicidad_Backstyle = 1 ;
            if ( StringUtil.StrCmp(subGridguia_publicidad_Class, "") != 0 )
            {
               subGridguia_publicidad_Linesclass = subGridguia_publicidad_Class+"Odd" ;
            }
            subGridguia_publicidad_Backcolor = (int)(0xF0F0F0) ;
         }
         else if ( subGridguia_publicidad_Backcolorstyle == 3 )
         {
            /* Report style subfile background logic. */
            subGridguia_publicidad_Backstyle = 1 ;
            if ( ((int)(nGXsfl_76_idx) % (2)) == 0 )
            {
               subGridguia_publicidad_Backcolor = (int)(0x0) ;
               if ( StringUtil.StrCmp(subGridguia_publicidad_Class, "") != 0 )
               {
                  subGridguia_publicidad_Linesclass = subGridguia_publicidad_Class+"Even" ;
               }
            }
            else
            {
               subGridguia_publicidad_Backcolor = (int)(0xF0F0F0) ;
               if ( StringUtil.StrCmp(subGridguia_publicidad_Class, "") != 0 )
               {
                  subGridguia_publicidad_Linesclass = subGridguia_publicidad_Class+"Odd" ;
               }
            }
         }
         imgprompt_16_Link = ((StringUtil.StrCmp(Gx_mode, "DSP")==0)||(StringUtil.StrCmp(Gx_mode, "UPD")==0) ? "" : "javascript:"+"gx.popup.openPrompt('"+"gx0060.aspx"+"',["+"{Ctrl:gx.dom.el('"+"PUBLICIDADID_"+sGXsfl_76_idx+"'), id:'"+"PUBLICIDADID_"+sGXsfl_76_idx+"'"+",isOut: true}"+"],"+"gx.dom.form()."+"nIsMod_12_"+sGXsfl_76_idx+","+"'', false"+","+"false"+");") ;
         /* * Property Link not supported in */
         /* * Property Link not supported in */
         /* Subfile cell */
         /* Single line edit */
         TempTags = " gxoch1=\"gx.fn.setControlValue('nIsMod_12_" + sGXsfl_76_idx + "',1);\"  onfocus=\"gx.evt.onfocus(this, 77,'',false,'" + sGXsfl_76_idx + "',76)\"" ;
         ClassString = "Attribute" ;
         StyleString = "" ;
         ROClassString = ClassString ;
         Gridguia_publicidadRow.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtPublicidadId_Internalname,StringUtil.LTrim( StringUtil.NToC( (decimal)(A16PublicidadId), 4, 0, ",", "")),StringUtil.LTrim( context.localUtil.Format( (decimal)(A16PublicidadId), "ZZZ9")),TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+"gx.num.valid_integer( this,'.');"+";gx.evt.onblur(77);\"",(String)"",(String)"",(String)"",(String)"",(String)"",(String)edtPublicidadId_Jsonclick,(short)0,(String)ClassString,(String)StyleString,(String)ROClassString,(short)-1,(int)edtPublicidadId_Enabled,(short)1,(String)"text",(String)"",(short)0,(String)"px",(short)17,(String)"px",(short)4,(short)0,(short)0,(short)76,(short)1,(short)-1,(bool)true,(String)"Id",(String)"right"});
         /* Subfile cell */
         /* Static images/pictures */
         ClassString = "Image" ;
         StyleString = "" ;
         Gridguia_publicidadRow.AddColumnProperties("bitmap", 1, isAjaxCallMode( ), new Object[] {(String)imgprompt_16_Internalname,"prompt.gif",(String)imgprompt_16_Link,(String)"",(String)"",context.GetTheme( ),(int)imgprompt_16_Visible,(short)1,(String)"",(String)"",(short)0,(short)0,(short)0,(String)"",(short)0,(String)"",(short)0,(short)0,(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)"",(String)"",(String)"",(String)"''",(String)"",(short)1,(bool)false,(bool)false});
         /* Subfile cell */
         /* Single line edit */
         TempTags = " gxoch1=\"gx.fn.setControlValue('nIsMod_12_" + sGXsfl_76_idx + "',1);\"  onfocus=\"gx.evt.onfocus(this, 78,'',false,'" + sGXsfl_76_idx + "',76)\"" ;
         ClassString = "Attribute" ;
         StyleString = "" ;
         ROClassString = ClassString ;
         Gridguia_publicidadRow.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtPublicidadCosto_Internalname,StringUtil.LTrim( StringUtil.NToC( (decimal)(A19PublicidadCosto), 4, 0, ",", "")),((edtPublicidadCosto_Enabled!=0) ? StringUtil.LTrim( context.localUtil.Format( (decimal)(A19PublicidadCosto), "ZZZ9")) : context.localUtil.Format( (decimal)(A19PublicidadCosto), "ZZZ9")),TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+"gx.num.valid_integer( this,'.');"+";gx.evt.onblur(78);\"",(String)"",(String)"",(String)"",(String)"",(String)"",(String)edtPublicidadCosto_Jsonclick,(short)0,(String)ClassString,(String)StyleString,(String)ROClassString,(short)-1,(int)edtPublicidadCosto_Enabled,(short)0,(String)"text",(String)"",(short)0,(String)"px",(short)17,(String)"px",(short)4,(short)0,(short)0,(short)76,(short)1,(short)-1,(bool)true,(String)"",(String)"right"});
         context.httpAjaxContext.ajax_sending_grid_row(Gridguia_publicidadRow);
         GXCCtl = "Z16PublicidadId_" + sGXsfl_76_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z16PublicidadId), 4, 0, ",", "")));
         GXCCtl = "Z19PublicidadCosto_" + sGXsfl_76_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z19PublicidadCosto), 4, 0, ",", "")));
         GXCCtl = "nRcdDeleted_12_" + sGXsfl_76_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdDeleted_12), 4, 0, ",", "")));
         GXCCtl = "nRcdExists_12_" + sGXsfl_76_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdExists_12), 4, 0, ",", "")));
         GXCCtl = "nIsMod_12_" + sGXsfl_76_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(nIsMod_12), 4, 0, ",", "")));
         GXCCtl = "vMODE_" + sGXsfl_76_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.RTrim( Gx_mode));
         GXCCtl = "vGUIAID_" + sGXsfl_76_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(AV7GuiaId), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "PUBLICIDADID_"+sGXsfl_76_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtPublicidadId_Enabled), 5, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "PUBLICIDADCOSTO_"+sGXsfl_76_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtPublicidadCosto_Enabled), 5, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "PROMPT_16_"+sGXsfl_76_idx+"Link", StringUtil.RTrim( imgprompt_16_Link));
         context.httpAjaxContext.ajax_sending_grid_row(null);
         Gridguia_publicidadContainer.AddRow(Gridguia_publicidadRow);
      }

      protected void ReadRow0712( )
      {
         nGXsfl_76_idx = (short)(nGXsfl_76_idx+1) ;
         sGXsfl_76_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_76_idx), 4, 0)), 4, "0") ;
         edtPublicidadId_Internalname = "PUBLICIDADID_"+sGXsfl_76_idx ;
         imgprompt_16_Internalname = "PROMPT_16_"+sGXsfl_76_idx ;
         edtPublicidadCosto_Internalname = "PUBLICIDADCOSTO_"+sGXsfl_76_idx ;
         edtPublicidadId_Enabled = (int)(context.localUtil.CToN( cgiGet( "PUBLICIDADID_"+sGXsfl_76_idx+"Enabled"), ",", ".")) ;
         edtPublicidadCosto_Enabled = (int)(context.localUtil.CToN( cgiGet( "PUBLICIDADCOSTO_"+sGXsfl_76_idx+"Enabled"), ",", ".")) ;
         imgprompt_32_Link = cgiGet( "PROMPT_16_"+sGXsfl_76_idx+"Link") ;
         if ( ( ( context.localUtil.CToN( cgiGet( edtPublicidadId_Internalname), ",", ".") < Convert.ToDecimal( 0 )) ) || ( ( context.localUtil.CToN( cgiGet( edtPublicidadId_Internalname), ",", ".") > Convert.ToDecimal( 9999 )) ) )
         {
            GX_msglist.addItem(context.GetMessage( "GXM_badnum", ""), 1, "PUBLICIDADID");
            AnyError = 1 ;
            GX_FocusControl = edtPublicidadId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
            wbErr = true ;
            A16PublicidadId = 0 ;
         }
         else
         {
            A16PublicidadId = (short)(context.localUtil.CToN( cgiGet( edtPublicidadId_Internalname), ",", ".")) ;
         }
         if ( ( ( context.localUtil.CToN( cgiGet( edtPublicidadCosto_Internalname), ",", ".") < Convert.ToDecimal( 0 )) ) || ( ( context.localUtil.CToN( cgiGet( edtPublicidadCosto_Internalname), ",", ".") > Convert.ToDecimal( 9999 )) ) )
         {
            GX_msglist.addItem(context.GetMessage( "GXM_badnum", ""), 1, "PUBLICIDADCOSTO");
            AnyError = 1 ;
            GX_FocusControl = edtPublicidadCosto_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
            wbErr = true ;
            A19PublicidadCosto = 0 ;
         }
         else
         {
            A19PublicidadCosto = (short)(context.localUtil.CToN( cgiGet( edtPublicidadCosto_Internalname), ",", ".")) ;
         }
         GXCCtl = "Z16PublicidadId_" + sGXsfl_76_idx ;
         Z16PublicidadId = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "Z19PublicidadCosto_" + sGXsfl_76_idx ;
         Z19PublicidadCosto = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nRcdDeleted_12_" + sGXsfl_76_idx ;
         nRcdDeleted_12 = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nRcdExists_12_" + sGXsfl_76_idx ;
         nRcdExists_12 = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nIsMod_12_" + sGXsfl_76_idx ;
         nIsMod_12 = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "vGUIAID_" + sGXsfl_76_idx ;
         AV7GuiaId = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
      }

      protected void assign_properties_default( )
      {
         defedtPublicidadId_Enabled = edtPublicidadId_Enabled ;
      }

      protected void ConfirmValues070( )
      {
         nGXsfl_76_idx = 0 ;
         sGXsfl_76_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_76_idx), 4, 0)), 4, "0") ;
         edtPublicidadId_Internalname = "PUBLICIDADID_"+sGXsfl_76_idx ;
         imgprompt_16_Internalname = "PROMPT_16_"+sGXsfl_76_idx ;
         edtPublicidadCosto_Internalname = "PUBLICIDADCOSTO_"+sGXsfl_76_idx ;
         while ( nGXsfl_76_idx < nRC_Gridguia_publicidad )
         {
            nGXsfl_76_idx = (short)(nGXsfl_76_idx+1) ;
            sGXsfl_76_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_76_idx), 4, 0)), 4, "0") ;
            edtPublicidadId_Internalname = "PUBLICIDADID_"+sGXsfl_76_idx ;
            imgprompt_16_Internalname = "PROMPT_16_"+sGXsfl_76_idx ;
            edtPublicidadCosto_Internalname = "PUBLICIDADCOSTO_"+sGXsfl_76_idx ;
            ChangePostValue( "Z16PublicidadId_"+sGXsfl_76_idx, cgiGet( "ZT_"+"Z16PublicidadId_"+sGXsfl_76_idx)) ;
            DeletePostValue( "ZT_"+"Z16PublicidadId_"+sGXsfl_76_idx) ;
            ChangePostValue( "Z19PublicidadCosto_"+sGXsfl_76_idx, cgiGet( "ZT_"+"Z19PublicidadCosto_"+sGXsfl_76_idx)) ;
            DeletePostValue( "ZT_"+"Z19PublicidadCosto_"+sGXsfl_76_idx) ;
         }
      }

      public override void RenderHtmlHeaders( )
      {
         GxWebStd.gx_html_headers( context, 0, "", "", Form.Meta, Form.Metaequiv, "IE=EmulateIE7");
      }

      public override void RenderHtmlOpenForm( )
      {
         context.WriteHtmlText( "<title>") ;
         context.WriteHtmlText( Form.Caption) ;
         context.WriteHtmlTextNl( "</title>") ;
         if ( StringUtil.Len( sDynURL) > 0 )
         {
            context.WriteHtmlText( "<BASE href=\""+sDynURL+"\" />") ;
         }
         define_styles( ) ;
         MasterPageObj.master_styles();
         if ( ! context.isSmartDevice( ) )
         {
            context.AddJavascriptSource("gxgral.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxcfg.js", "?"+context.GetBuildNumber( 58381));
         }
         else
         {
            context.AddJavascriptSource("gxapiSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxfxSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxtypesSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxpopupSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxfrmutlSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxgridSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("JavaScripTableSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("rijndaelSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxgralSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxcfg.js", "?"+context.GetBuildNumber( 58381));
         }
         context.AddJavascriptSource("calendar.js", "?"+context.GetBuildNumber( 58381));
         context.AddJavascriptSource("calendar-setup.js", "?"+context.GetBuildNumber( 58381));
         context.AddJavascriptSource("calendar-es.js", "?"+context.GetBuildNumber( 58381));
         context.WriteHtmlText( Form.Headerrawhtml) ;
         context.CloseHtmlHeader();
         FormProcess = " onkeyup=\"gx.evt.onkeyup(event)\" onkeypress=\"gx.evt.onkeypress(event,true,false)\" onkeydown=\"gx.evt.onkeypress(null,true,false)\"" ;
         context.WriteHtmlText( "<body") ;
         context.WriteHtmlText( " "+"class=\"Form\""+" "+" style=\"-moz-opacity:0;opacity:0;"+"background-color:"+context.BuildHTMLColor( Form.Backcolor)+";") ;
         if ( ! ( String.IsNullOrEmpty(StringUtil.RTrim( Form.Background)) ) )
         {
            context.WriteHtmlText( " background-image:url("+context.convertURL( Form.Background)+")") ;
         }
         context.WriteHtmlText( "\""+FormProcess+">") ;
         context.skipLines(1);
         context.WriteHtmlTextNl( "<form id=\"MAINFORM\" onsubmit=\"try{return gx.csv.validForm()}catch(e){return true;}\" name=\"MAINFORM\" method=\"post\" class=\"Form\" novalidate action=\""+formatLink("guia.aspx") + "?" + UrlEncode(StringUtil.RTrim(Gx_mode)) + "," + UrlEncode("" +AV7GuiaId)+"\">") ;
         GxWebStd.gx_hidden_field( context, "_EventName", "");
         GxWebStd.gx_hidden_field( context, "_EventGridId", "");
         GxWebStd.gx_hidden_field( context, "_EventRowId", "");
      }

      public override void RenderHtmlCloseForm( )
      {
         /* Send hidden variables. */
         /* Send saved values. */
         GxWebStd.gx_hidden_field( context, "Z22GuiaId", StringUtil.LTrim( StringUtil.NToC( (decimal)(Z22GuiaId), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "Z23GuiaFecha", context.localUtil.DToC( Z23GuiaFecha, 0, "/"));
         GxWebStd.gx_hidden_field( context, "Z24GuiaDescripcion", StringUtil.RTrim( Z24GuiaDescripcion));
         GxWebStd.gx_hidden_field( context, "Z32PeriodistaRespId", StringUtil.LTrim( StringUtil.NToC( (decimal)(Z32PeriodistaRespId), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "Z38PeriodistaAsisId", StringUtil.LTrim( StringUtil.NToC( (decimal)(Z38PeriodistaAsisId), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "IsConfirmed", StringUtil.LTrim( StringUtil.NToC( (decimal)(IsConfirmed), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "IsModified", StringUtil.LTrim( StringUtil.NToC( (decimal)(IsModified), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "Mode", StringUtil.RTrim( Gx_mode));
         GxWebStd.gx_hidden_field( context, "nRC_Gridguia_publicidad", StringUtil.LTrim( StringUtil.NToC( (decimal)(nGXsfl_76_idx), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "N32PeriodistaRespId", StringUtil.LTrim( StringUtil.NToC( (decimal)(A32PeriodistaRespId), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "N38PeriodistaAsisId", StringUtil.LTrim( StringUtil.NToC( (decimal)(A38PeriodistaAsisId), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "vGUIAID", StringUtil.LTrim( StringUtil.NToC( (decimal)(AV7GuiaId), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "vINSERT_PERIODISTARESPID", StringUtil.LTrim( StringUtil.NToC( (decimal)(AV12Insert_PeriodistaRespId), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "vINSERT_PERIODISTAASISID", StringUtil.LTrim( StringUtil.NToC( (decimal)(AV13Insert_PeriodistaAsisId), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "vPGMNAME", StringUtil.RTrim( AV15Pgmname));
         GxWebStd.gx_hidden_field( context, "vMODE", StringUtil.RTrim( Gx_mode));
         GxWebStd.gx_hidden_field( context, "GX_FocusControl", GX_FocusControl);
         SendAjaxEncryptionKey();
         SendComponentObjects();
         SendServerCommands();
         SendState();
         context.WriteHtmlTextNl( "</form>") ;
         include_jscripts( ) ;
      }

      public override short ExecuteStartEvent( )
      {
         standaloneStartup( ) ;
         gxajaxcallmode = (short)((isAjaxCallMode( ) ? 1 : 0)) ;
         return gxajaxcallmode ;
      }

      public override void RenderHtmlContent( )
      {
         Draw( ) ;
      }

      public override void DispatchEvents( )
      {
         Process( ) ;
      }

      public override bool HasEnterEvent( )
      {
         return true ;
      }

      public override String GetPgmname( )
      {
         return "Guia" ;
      }

      public override String GetPgmdesc( )
      {
         return "Guia" ;
      }

      public override GXWebForm GetForm( )
      {
         return Form ;
      }

      public override String GetSelfLink( )
      {
         return formatLink("guia.aspx") + "?" + UrlEncode(StringUtil.RTrim(Gx_mode)) + "," + UrlEncode("" +AV7GuiaId) ;
      }

      protected void InitializeNonKey078( )
      {
         A32PeriodistaRespId = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A32PeriodistaRespId", StringUtil.LTrim( StringUtil.Str( (decimal)(A32PeriodistaRespId), 4, 0)));
         A38PeriodistaAsisId = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A38PeriodistaAsisId", StringUtil.LTrim( StringUtil.Str( (decimal)(A38PeriodistaAsisId), 4, 0)));
         A23GuiaFecha = DateTime.MinValue ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A23GuiaFecha", context.localUtil.Format(A23GuiaFecha, "99/99/99"));
         A24GuiaDescripcion = "" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A24GuiaDescripcion", A24GuiaDescripcion);
         A33PeriodistaRespNom = "" ;
         n33PeriodistaRespNom = false ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A33PeriodistaRespNom", A33PeriodistaRespNom);
         A39PeriodistaAsisNom = "" ;
         n39PeriodistaAsisNom = false ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A39PeriodistaAsisNom", A39PeriodistaAsisNom);
      }

      protected void InitAll078( )
      {
         A22GuiaId = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A22GuiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A22GuiaId), 4, 0)));
         InitializeNonKey078( ) ;
      }

      protected void StandaloneModalInsert( )
      {
      }

      protected void InitializeNonKey0712( )
      {
         A19PublicidadCosto = 0 ;
      }

      protected void InitAll0712( )
      {
         A16PublicidadId = 0 ;
         InitializeNonKey0712( ) ;
      }

      protected void StandaloneModalInsert0712( )
      {
      }

      protected void define_styles( )
      {
         AddStyleSheetFile("calendar-system.css", "?21265620");
         AddThemeStyleSheetFile("", context.GetTheme( )+".css", "?20412474");
         idxLst = 1 ;
         while ( idxLst <= Form.Jscriptsrc.Count )
         {
            context.AddJavascriptSource(StringUtil.RTrim( Form.Jscriptsrc.Item(idxLst)), "?20128282121269");
            idxLst = (int)(idxLst+1) ;
         }
         /* End function define_styles */
      }

      protected void include_jscripts( )
      {
         context.AddJavascriptSource("messages.spa.js", "?"+context.GetBuildNumber( 58381));
         context.AddJavascriptSource("guia.js", "?20128282121269");
         /* End function include_jscripts */
      }

      protected void init_level_properties12( )
      {
         edtPublicidadId_Enabled = defedtPublicidadId_Enabled ;
      }

      protected void init_default_properties( )
      {
         imgBtn_first_Internalname = "BTN_FIRST" ;
         imgBtn_first_separator_Internalname = "BTN_FIRST_SEPARATOR" ;
         imgBtn_previous_Internalname = "BTN_PREVIOUS" ;
         imgBtn_previous_separator_Internalname = "BTN_PREVIOUS_SEPARATOR" ;
         imgBtn_next_Internalname = "BTN_NEXT" ;
         imgBtn_next_separator_Internalname = "BTN_NEXT_SEPARATOR" ;
         imgBtn_last_Internalname = "BTN_LAST" ;
         imgBtn_last_separator_Internalname = "BTN_LAST_SEPARATOR" ;
         imgBtn_select_Internalname = "BTN_SELECT" ;
         imgBtn_select_separator_Internalname = "BTN_SELECT_SEPARATOR" ;
         imgBtn_enter2_Internalname = "BTN_ENTER2" ;
         imgBtn_enter2_separator_Internalname = "BTN_ENTER2_SEPARATOR" ;
         imgBtn_cancel2_Internalname = "BTN_CANCEL2" ;
         imgBtn_cancel2_separator_Internalname = "BTN_CANCEL2_SEPARATOR" ;
         imgBtn_delete2_Internalname = "BTN_DELETE2" ;
         imgBtn_delete2_separator_Internalname = "BTN_DELETE2_SEPARATOR" ;
         divSectiontoolbar_Internalname = "SECTIONTOOLBAR" ;
         tblTabletoolbar_Internalname = "TABLETOOLBAR" ;
         lblTextblockguiaid_Internalname = "TEXTBLOCKGUIAID" ;
         edtGuiaId_Internalname = "GUIAID" ;
         lblTextblockguiafecha_Internalname = "TEXTBLOCKGUIAFECHA" ;
         edtGuiaFecha_Internalname = "GUIAFECHA" ;
         lblTextblockguiadescripcion_Internalname = "TEXTBLOCKGUIADESCRIPCION" ;
         edtGuiaDescripcion_Internalname = "GUIADESCRIPCION" ;
         lblTextblockperiodistarespid_Internalname = "TEXTBLOCKPERIODISTARESPID" ;
         edtPeriodistaRespId_Internalname = "PERIODISTARESPID" ;
         lblTextblockperiodistarespnom_Internalname = "TEXTBLOCKPERIODISTARESPNOM" ;
         edtPeriodistaRespNom_Internalname = "PERIODISTARESPNOM" ;
         lblTextblockperiodistaasisid_Internalname = "TEXTBLOCKPERIODISTAASISID" ;
         edtPeriodistaAsisId_Internalname = "PERIODISTAASISID" ;
         lblTextblockperiodistaasisnom_Internalname = "TEXTBLOCKPERIODISTAASISNOM" ;
         edtPeriodistaAsisNom_Internalname = "PERIODISTAASISNOM" ;
         lblTitlepublicidad_Internalname = "TITLEPUBLICIDAD" ;
         tblTable3_Internalname = "TABLE3" ;
         tblTable2_Internalname = "TABLE2" ;
         bttBtn_enter_Internalname = "BTN_ENTER" ;
         bttBtn_cancel_Internalname = "BTN_CANCEL" ;
         bttBtn_delete_Internalname = "BTN_DELETE" ;
         tblTable1_Internalname = "TABLE1" ;
         grpGroupdata_Internalname = "GROUPDATA" ;
         tblTablemain_Internalname = "TABLEMAIN" ;
         Form.Internalname = "FORM" ;
         imgprompt_32_Internalname = "PROMPT_32" ;
         imgprompt_38_Internalname = "PROMPT_38" ;
         subGridguia_publicidad_Internalname = "GRIDGUIA_PUBLICIDAD" ;
      }

      public override void initialize_properties( )
      {
         init_default_properties( ) ;
         Form.Headerrawhtml = "" ;
         Form.Background = "" ;
         Form.Backcolor = (int)(0xFFFFFF) ;
         Form.Caption = "Guia" ;
         edtPublicidadCosto_Jsonclick = "" ;
         imgprompt_16_Visible = 1 ;
         imgprompt_16_Link = "" ;
         imgprompt_32_Visible = 1 ;
         edtPublicidadId_Jsonclick = "" ;
         subGridguia_publicidad_Class = "Grid" ;
         imgBtn_delete2_separator_Visible = 1 ;
         imgBtn_delete2_Enabled = 1 ;
         imgBtn_delete2_Visible = 1 ;
         imgBtn_cancel2_separator_Visible = 1 ;
         imgBtn_cancel2_Visible = 1 ;
         imgBtn_enter2_separator_Visible = 1 ;
         imgBtn_enter2_Enabled = 1 ;
         imgBtn_enter2_Visible = 1 ;
         imgBtn_select_separator_Visible = 1 ;
         imgBtn_select_Visible = 1 ;
         imgBtn_last_separator_Visible = 1 ;
         imgBtn_last_Visible = 1 ;
         imgBtn_next_separator_Visible = 1 ;
         imgBtn_next_Visible = 1 ;
         imgBtn_previous_separator_Visible = 1 ;
         imgBtn_previous_Visible = 1 ;
         imgBtn_first_separator_Visible = 1 ;
         imgBtn_first_Visible = 1 ;
         subGridguia_publicidad_Allowcollapsing = 0 ;
         subGridguia_publicidad_Allowselection = 0 ;
         edtPublicidadCosto_Enabled = 1 ;
         edtPublicidadId_Enabled = 1 ;
         subGridguia_publicidad_Backcolorstyle = 2 ;
         edtPeriodistaAsisNom_Jsonclick = "" ;
         edtPeriodistaAsisNom_Enabled = 0 ;
         imgprompt_38_Visible = 1 ;
         imgprompt_38_Link = "" ;
         edtPeriodistaAsisId_Jsonclick = "" ;
         edtPeriodistaAsisId_Enabled = 1 ;
         edtPeriodistaRespNom_Jsonclick = "" ;
         edtPeriodistaRespNom_Enabled = 0 ;
         imgprompt_32_Visible = 1 ;
         imgprompt_32_Link = "" ;
         edtPeriodistaRespId_Jsonclick = "" ;
         edtPeriodistaRespId_Enabled = 1 ;
         edtGuiaDescripcion_Jsonclick = "" ;
         edtGuiaDescripcion_Enabled = 1 ;
         edtGuiaFecha_Jsonclick = "" ;
         edtGuiaFecha_Enabled = 1 ;
         edtGuiaId_Jsonclick = "" ;
         edtGuiaId_Enabled = 0 ;
         bttBtn_delete_Visible = 1 ;
         bttBtn_cancel_Visible = 1 ;
         bttBtn_enter_Visible = 1 ;
         context.GX_msglist.DisplayMode = 1 ;
      }

      protected void dynload_actions( )
      {
         /* End function dynload_actions */
      }

      protected void gxnrGridguia_publicidad_newrow( short nRC_Gridguia_publicidad ,
                                                     short nGXsfl_76_idx ,
                                                     String sGXsfl_76_idx )
      {
         GxWebStd.set_html_headers( context, 0, "", "");
         Gx_mode = "INS" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         edtPublicidadId_Internalname = "PUBLICIDADID_"+sGXsfl_76_idx ;
         imgprompt_16_Internalname = "PROMPT_16_"+sGXsfl_76_idx ;
         edtPublicidadCosto_Internalname = "PUBLICIDADCOSTO_"+sGXsfl_76_idx ;
         while ( nGXsfl_76_idx <= nRC_Gridguia_publicidad )
         {
            standaloneNotModal( ) ;
            standaloneModal( ) ;
            standaloneNotModal0712( ) ;
            standaloneModal0712( ) ;
            dynload_actions( ) ;
            SendRow0712( ) ;
            nGXsfl_76_idx = (short)(nGXsfl_76_idx+1) ;
            sGXsfl_76_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_76_idx), 4, 0)), 4, "0") ;
            edtPublicidadId_Internalname = "PUBLICIDADID_"+sGXsfl_76_idx ;
            imgprompt_16_Internalname = "PROMPT_16_"+sGXsfl_76_idx ;
            edtPublicidadCosto_Internalname = "PUBLICIDADCOSTO_"+sGXsfl_76_idx ;
         }
         context.GX_webresponse.AddString(Gridguia_publicidadContainer.ToJavascriptSource());
         /* End function gxnrGridguia_publicidad_newrow */
      }

      public void Valid_Periodistarespid( short GX_Parm1 ,
                                          String GX_Parm2 )
      {
         A32PeriodistaRespId = GX_Parm1 ;
         A33PeriodistaRespNom = GX_Parm2 ;
         n33PeriodistaRespNom = false ;
         /* Using cursor T000720 */
         pr_default.execute(18, new Object[] {A32PeriodistaRespId});
         if ( (pr_default.getStatus(18) == 101) )
         {
            AnyError32 = 1 ;
            GX_msglist.addItem("No existe 'Periodista Resp'.", "ForeignKeyNotFound", 1, "PERIODISTARESPID");
            AnyError = 1 ;
            GX_FocusControl = edtPeriodistaRespId_Internalname ;
         }
         if ( AnyError32 == 0 )
         {
            A33PeriodistaRespNom = T000720_A33PeriodistaRespNom[0] ;
            n33PeriodistaRespNom = T000720_n33PeriodistaRespNom[0] ;
         }
         pr_default.close(18);
         dynload_actions( ) ;
         if ( AnyError == 1 )
         {
            A33PeriodistaRespNom = "" ;
            n33PeriodistaRespNom = false ;
         }
         isValidOutput.Add((Object)(StringUtil.RTrim( A33PeriodistaRespNom)));
         isValidOutput.Add((Object)(context.GX_msglist.ToJavascriptSource()));
         context.GX_webresponse.AddString(isValidOutput.ToJSonString());
         wbTemp = context.ResponseContentType( "application/json") ;
      }

      public void Valid_Periodistaasisid( short GX_Parm1 ,
                                          short GX_Parm2 ,
                                          String GX_Parm3 )
      {
         A38PeriodistaAsisId = GX_Parm1 ;
         A32PeriodistaRespId = GX_Parm2 ;
         A39PeriodistaAsisNom = GX_Parm3 ;
         n39PeriodistaAsisNom = false ;
         /* Using cursor T000721 */
         pr_default.execute(19, new Object[] {A38PeriodistaAsisId});
         if ( (pr_default.getStatus(19) == 101) )
         {
            AnyError38 = 1 ;
            GX_msglist.addItem("No existe 'Periodista Asis'.", "ForeignKeyNotFound", 1, "PERIODISTAASISID");
            AnyError = 1 ;
            GX_FocusControl = edtPeriodistaAsisId_Internalname ;
         }
         if ( AnyError38 == 0 )
         {
            A39PeriodistaAsisNom = T000721_A39PeriodistaAsisNom[0] ;
            n39PeriodistaAsisNom = T000721_n39PeriodistaAsisNom[0] ;
         }
         pr_default.close(19);
         if ( A38PeriodistaAsisId == A32PeriodistaRespId )
         {
            GX_msglist.addItem("Los periodistas no pueden ser iguales", 1, "PERIODISTAASISID");
            AnyError = 1 ;
            GX_FocusControl = edtPeriodistaAsisId_Internalname ;
         }
         dynload_actions( ) ;
         if ( AnyError == 1 )
         {
            A39PeriodistaAsisNom = "" ;
            n39PeriodistaAsisNom = false ;
         }
         isValidOutput.Add((Object)(StringUtil.RTrim( A39PeriodistaAsisNom)));
         isValidOutput.Add((Object)(context.GX_msglist.ToJavascriptSource()));
         context.GX_webresponse.AddString(isValidOutput.ToJSonString());
         wbTemp = context.ResponseContentType( "application/json") ;
      }

      public void Valid_Publicidadid( short GX_Parm1 )
      {
         A16PublicidadId = GX_Parm1 ;
         /* Using cursor T000730 */
         pr_default.execute(28, new Object[] {A16PublicidadId});
         if ( (pr_default.getStatus(28) == 101) )
         {
            AnyError16 = 1 ;
            GX_msglist.addItem("No existe 'Publicidad'.", "ForeignKeyNotFound", 1, "PUBLICIDADID");
            AnyError = 1 ;
            GX_FocusControl = edtPublicidadId_Internalname ;
         }
         if ( AnyError16 == 0 )
         {
         }
         pr_default.close(28);
         dynload_actions( ) ;
         isValidOutput.Add((Object)(context.GX_msglist.ToJavascriptSource()));
         context.GX_webresponse.AddString(isValidOutput.ToJSonString());
         wbTemp = context.ResponseContentType( "application/json") ;
      }

      public void cleanup( )
      {
         flushBuffer();
         CloseOpenCursors();
         if ( IsMain )
         {
            context.CloseConnections() ;
         }
      }

      protected void CloseOpenCursors( )
      {
         pr_default.close(27);
         pr_default.close(28);
         pr_default.close(20);
         pr_default.close(12);
         pr_default.close(11);
         pr_default.close(18);
         pr_default.close(19);
      }

      public override void initialize( )
      {
         sPrefix = "" ;
         wcpOGx_mode = "" ;
         scmdbuf = "" ;
         gxfirstwebparm = "" ;
         gxfirstwebparm_bkp = "" ;
         PreviousTooltip = "" ;
         PreviousCaption = "" ;
         Form = new GXWebForm();
         GX_FocusControl = "" ;
         sStyleString = "" ;
         ClassString = "" ;
         StyleString = "" ;
         TempTags = "" ;
         bttBtn_enter_Jsonclick = "" ;
         bttBtn_cancel_Jsonclick = "" ;
         bttBtn_delete_Jsonclick = "" ;
         lblTextblockguiaid_Jsonclick = "" ;
         lblTextblockguiafecha_Jsonclick = "" ;
         A23GuiaFecha = DateTime.MinValue ;
         lblTextblockguiadescripcion_Jsonclick = "" ;
         A24GuiaDescripcion = "" ;
         lblTextblockperiodistarespid_Jsonclick = "" ;
         lblTextblockperiodistarespnom_Jsonclick = "" ;
         A33PeriodistaRespNom = "" ;
         lblTextblockperiodistaasisid_Jsonclick = "" ;
         lblTextblockperiodistaasisnom_Jsonclick = "" ;
         A39PeriodistaAsisNom = "" ;
         Gridguia_publicidadContainer = new GXWebGrid( context);
         Gridguia_publicidadColumn = new GXWebColumn();
         sMode12 = "" ;
         edtPublicidadId_Internalname = "" ;
         lblTitlepublicidad_Jsonclick = "" ;
         imgBtn_first_Jsonclick = "" ;
         imgBtn_first_separator_Jsonclick = "" ;
         imgBtn_previous_Jsonclick = "" ;
         imgBtn_previous_separator_Jsonclick = "" ;
         imgBtn_next_Jsonclick = "" ;
         imgBtn_next_separator_Jsonclick = "" ;
         imgBtn_last_Jsonclick = "" ;
         imgBtn_last_separator_Jsonclick = "" ;
         imgBtn_select_Jsonclick = "" ;
         imgBtn_select_separator_Jsonclick = "" ;
         imgBtn_enter2_Jsonclick = "" ;
         imgBtn_enter2_separator_Jsonclick = "" ;
         imgBtn_cancel2_Jsonclick = "" ;
         imgBtn_cancel2_separator_Jsonclick = "" ;
         imgBtn_delete2_Jsonclick = "" ;
         imgBtn_delete2_separator_Jsonclick = "" ;
         Z23GuiaFecha = DateTime.MinValue ;
         Z24GuiaDescripcion = "" ;
         AV15Pgmname = "" ;
         sMode8 = "" ;
         sEvt = "" ;
         EvtGridId = "" ;
         EvtRowId = "" ;
         sEvtType = "" ;
         edtPublicidadCosto_Internalname = "" ;
         AV10TrnContext = new SdtTransactionContext(context);
         AV11WebSession = new GxWebSession( context);
         AV14TrnContextAtt = new SdtTransactionContext_Attribute(context);
         Z33PeriodistaRespNom = "" ;
         Z39PeriodistaAsisNom = "" ;
         T00078_A39PeriodistaAsisNom = new String[] {""} ;
         T00078_n39PeriodistaAsisNom = new bool[] {false} ;
         T00077_A33PeriodistaRespNom = new String[] {""} ;
         T00077_n33PeriodistaRespNom = new bool[] {false} ;
         T00079_A22GuiaId = new short[1] ;
         T00079_A23GuiaFecha = new DateTime[] {DateTime.MinValue} ;
         T00079_A24GuiaDescripcion = new String[] {""} ;
         T00079_A33PeriodistaRespNom = new String[] {""} ;
         T00079_n33PeriodistaRespNom = new bool[] {false} ;
         T00079_A39PeriodistaAsisNom = new String[] {""} ;
         T00079_n39PeriodistaAsisNom = new bool[] {false} ;
         T00079_A32PeriodistaRespId = new short[1] ;
         T00079_A38PeriodistaAsisId = new short[1] ;
         T000710_A33PeriodistaRespNom = new String[] {""} ;
         T000710_n33PeriodistaRespNom = new bool[] {false} ;
         T000711_A39PeriodistaAsisNom = new String[] {""} ;
         T000711_n39PeriodistaAsisNom = new bool[] {false} ;
         T000712_A22GuiaId = new short[1] ;
         T00076_A22GuiaId = new short[1] ;
         T00076_A23GuiaFecha = new DateTime[] {DateTime.MinValue} ;
         T00076_A24GuiaDescripcion = new String[] {""} ;
         T00076_A32PeriodistaRespId = new short[1] ;
         T00076_A38PeriodistaAsisId = new short[1] ;
         T000713_A22GuiaId = new short[1] ;
         T000714_A22GuiaId = new short[1] ;
         T000715_A22GuiaId = new short[1] ;
         T000715_A23GuiaFecha = new DateTime[] {DateTime.MinValue} ;
         T000715_A24GuiaDescripcion = new String[] {""} ;
         T000715_A32PeriodistaRespId = new short[1] ;
         T000715_A38PeriodistaAsisId = new short[1] ;
         T000717_A22GuiaId = new short[1] ;
         T000720_A33PeriodistaRespNom = new String[] {""} ;
         T000720_n33PeriodistaRespNom = new bool[] {false} ;
         T000721_A39PeriodistaAsisNom = new String[] {""} ;
         T000721_n39PeriodistaAsisNom = new bool[] {false} ;
         T000722_A22GuiaId = new short[1] ;
         T000723_A22GuiaId = new short[1] ;
         T000723_A19PublicidadCosto = new short[1] ;
         T000723_A16PublicidadId = new short[1] ;
         T00074_A16PublicidadId = new short[1] ;
         T000724_A16PublicidadId = new short[1] ;
         T000725_A22GuiaId = new short[1] ;
         T000725_A16PublicidadId = new short[1] ;
         T00073_A22GuiaId = new short[1] ;
         T00073_A19PublicidadCosto = new short[1] ;
         T00073_A16PublicidadId = new short[1] ;
         T00072_A22GuiaId = new short[1] ;
         T00072_A19PublicidadCosto = new short[1] ;
         T00072_A16PublicidadId = new short[1] ;
         T000729_A22GuiaId = new short[1] ;
         T000729_A16PublicidadId = new short[1] ;
         imgprompt_16_Internalname = "" ;
         Gridguia_publicidadRow = new GXWebRow();
         subGridguia_publicidad_Linesclass = "" ;
         ROClassString = "" ;
         GXCCtl = "" ;
         sDynURL = "" ;
         FormProcess = "" ;
         isValidOutput = new GxUnknownObjectCollection();
         T000730_A16PublicidadId = new short[1] ;
         pr_default = new DataStoreProvider(context, new GeneXus.Programs.guia__default(),
            new Object[][] {
                new Object[] {
               T00072_A22GuiaId, T00072_A19PublicidadCosto, T00072_A16PublicidadId
               }
               , new Object[] {
               T00073_A22GuiaId, T00073_A19PublicidadCosto, T00073_A16PublicidadId
               }
               , new Object[] {
               T00074_A16PublicidadId
               }
               , new Object[] {
               T00075_A22GuiaId, T00075_A23GuiaFecha, T00075_A24GuiaDescripcion, T00075_A32PeriodistaRespId, T00075_A38PeriodistaAsisId
               }
               , new Object[] {
               T00076_A22GuiaId, T00076_A23GuiaFecha, T00076_A24GuiaDescripcion, T00076_A32PeriodistaRespId, T00076_A38PeriodistaAsisId
               }
               , new Object[] {
               T00077_A33PeriodistaRespNom, T00077_n33PeriodistaRespNom
               }
               , new Object[] {
               T00078_A39PeriodistaAsisNom, T00078_n39PeriodistaAsisNom
               }
               , new Object[] {
               T00079_A22GuiaId, T00079_A23GuiaFecha, T00079_A24GuiaDescripcion, T00079_A33PeriodistaRespNom, T00079_n33PeriodistaRespNom, T00079_A39PeriodistaAsisNom, T00079_n39PeriodistaAsisNom, T00079_A32PeriodistaRespId, T00079_A38PeriodistaAsisId
               }
               , new Object[] {
               T000710_A33PeriodistaRespNom, T000710_n33PeriodistaRespNom
               }
               , new Object[] {
               T000711_A39PeriodistaAsisNom, T000711_n39PeriodistaAsisNom
               }
               , new Object[] {
               T000712_A22GuiaId
               }
               , new Object[] {
               T000713_A22GuiaId
               }
               , new Object[] {
               T000714_A22GuiaId
               }
               , new Object[] {
               T000715_A22GuiaId, T000715_A23GuiaFecha, T000715_A24GuiaDescripcion, T000715_A32PeriodistaRespId, T000715_A38PeriodistaAsisId
               }
               , new Object[] {
               }
               , new Object[] {
               T000717_A22GuiaId
               }
               , new Object[] {
               }
               , new Object[] {
               }
               , new Object[] {
               T000720_A33PeriodistaRespNom, T000720_n33PeriodistaRespNom
               }
               , new Object[] {
               T000721_A39PeriodistaAsisNom, T000721_n39PeriodistaAsisNom
               }
               , new Object[] {
               T000722_A22GuiaId
               }
               , new Object[] {
               T000723_A22GuiaId, T000723_A19PublicidadCosto, T000723_A16PublicidadId
               }
               , new Object[] {
               T000724_A16PublicidadId
               }
               , new Object[] {
               T000725_A22GuiaId, T000725_A16PublicidadId
               }
               , new Object[] {
               }
               , new Object[] {
               }
               , new Object[] {
               }
               , new Object[] {
               T000729_A22GuiaId, T000729_A16PublicidadId
               }
               , new Object[] {
               T000730_A16PublicidadId
               }
            }
         );
         AV15Pgmname = "Guia" ;
      }

      private short nIsMod_12 ;
      private short wcpOAV7GuiaId ;
      private short GxWebError ;
      private short A32PeriodistaRespId ;
      private short A38PeriodistaAsisId ;
      private short A16PublicidadId ;
      private short nRC_Gridguia_publicidad ;
      private short nGXsfl_76_idx=1 ;
      private short AV7GuiaId ;
      private short IsConfirmed ;
      private short IsModified ;
      private short AnyError ;
      private short nKeyPressed ;
      private short initialized ;
      private short A22GuiaId ;
      private short subGridguia_publicidad_Backcolorstyle ;
      private short A19PublicidadCosto ;
      private short subGridguia_publicidad_Allowselection ;
      private short subGridguia_publicidad_Allowhovering ;
      private short subGridguia_publicidad_Allowcollapsing ;
      private short subGridguia_publicidad_Collapsed ;
      private short nBlankRcdCount12 ;
      private short nRcdExists_12 ;
      private short RcdFound12 ;
      private short nBlankRcdUsr12 ;
      private short Z22GuiaId ;
      private short Z32PeriodistaRespId ;
      private short Z38PeriodistaAsisId ;
      private short N32PeriodistaRespId ;
      private short N38PeriodistaAsisId ;
      private short AV12Insert_PeriodistaRespId ;
      private short AV13Insert_PeriodistaAsisId ;
      private short RcdFound8 ;
      private short nRcdDeleted_12 ;
      private short Z16PublicidadId ;
      private short Z19PublicidadCosto ;
      private short GX_JID ;
      private short Gx_BScreen ;
      private short subGridguia_publicidad_Backstyle ;
      private short gxajaxcallmode ;
      private short wbTemp ;
      private int trnEnded ;
      private int bttBtn_enter_Visible ;
      private int bttBtn_cancel_Visible ;
      private int bttBtn_delete_Visible ;
      private int edtGuiaId_Enabled ;
      private int edtGuiaFecha_Enabled ;
      private int edtGuiaDescripcion_Enabled ;
      private int edtPeriodistaRespId_Enabled ;
      private int imgprompt_32_Visible ;
      private int edtPeriodistaRespNom_Enabled ;
      private int edtPeriodistaAsisId_Enabled ;
      private int imgprompt_38_Visible ;
      private int edtPeriodistaAsisNom_Enabled ;
      private int edtPublicidadId_Enabled ;
      private int edtPublicidadCosto_Enabled ;
      private int subGridguia_publicidad_Selectioncolor ;
      private int subGridguia_publicidad_Hoveringcolor ;
      private int fRowAdded ;
      private int imgBtn_first_Visible ;
      private int imgBtn_first_separator_Visible ;
      private int imgBtn_previous_Visible ;
      private int imgBtn_previous_separator_Visible ;
      private int imgBtn_next_Visible ;
      private int imgBtn_next_separator_Visible ;
      private int imgBtn_last_Visible ;
      private int imgBtn_last_separator_Visible ;
      private int imgBtn_select_Visible ;
      private int imgBtn_select_separator_Visible ;
      private int imgBtn_enter2_Visible ;
      private int imgBtn_enter2_Enabled ;
      private int imgBtn_enter2_separator_Visible ;
      private int imgBtn_cancel2_Visible ;
      private int imgBtn_cancel2_separator_Visible ;
      private int imgBtn_delete2_Visible ;
      private int imgBtn_delete2_Enabled ;
      private int imgBtn_delete2_separator_Visible ;
      private int GRIDGUIA_PUBLICIDAD_nFirstRecordOnPage ;
      private int AV16GXV1 ;
      private int AnyError32 ;
      private int AnyError38 ;
      private int AnyError16 ;
      private int subGridguia_publicidad_Backcolor ;
      private int subGridguia_publicidad_Allbackcolor ;
      private int imgprompt_16_Visible ;
      private int defedtPublicidadId_Enabled ;
      private int idxLst ;
      private String sPrefix ;
      private String sGXsfl_76_idx="0001" ;
      private String wcpOGx_mode ;
      private String scmdbuf ;
      private String gxfirstwebparm ;
      private String gxfirstwebparm_bkp ;
      private String Gx_mode ;
      private String PreviousTooltip ;
      private String PreviousCaption ;
      private String GX_FocusControl ;
      private String edtGuiaFecha_Internalname ;
      private String sStyleString ;
      private String tblTablemain_Internalname ;
      private String ClassString ;
      private String StyleString ;
      private String grpGroupdata_Internalname ;
      private String tblTable1_Internalname ;
      private String TempTags ;
      private String bttBtn_enter_Internalname ;
      private String bttBtn_enter_Jsonclick ;
      private String bttBtn_cancel_Internalname ;
      private String bttBtn_cancel_Jsonclick ;
      private String bttBtn_delete_Internalname ;
      private String bttBtn_delete_Jsonclick ;
      private String tblTable2_Internalname ;
      private String lblTextblockguiaid_Internalname ;
      private String lblTextblockguiaid_Jsonclick ;
      private String edtGuiaId_Internalname ;
      private String edtGuiaId_Jsonclick ;
      private String lblTextblockguiafecha_Internalname ;
      private String lblTextblockguiafecha_Jsonclick ;
      private String edtGuiaFecha_Jsonclick ;
      private String lblTextblockguiadescripcion_Internalname ;
      private String lblTextblockguiadescripcion_Jsonclick ;
      private String edtGuiaDescripcion_Internalname ;
      private String edtGuiaDescripcion_Jsonclick ;
      private String lblTextblockperiodistarespid_Internalname ;
      private String lblTextblockperiodistarespid_Jsonclick ;
      private String edtPeriodistaRespId_Internalname ;
      private String edtPeriodistaRespId_Jsonclick ;
      private String imgprompt_32_Internalname ;
      private String imgprompt_32_Link ;
      private String lblTextblockperiodistarespnom_Internalname ;
      private String lblTextblockperiodistarespnom_Jsonclick ;
      private String edtPeriodistaRespNom_Internalname ;
      private String edtPeriodistaRespNom_Jsonclick ;
      private String lblTextblockperiodistaasisid_Internalname ;
      private String lblTextblockperiodistaasisid_Jsonclick ;
      private String edtPeriodistaAsisId_Internalname ;
      private String edtPeriodistaAsisId_Jsonclick ;
      private String imgprompt_38_Internalname ;
      private String imgprompt_38_Link ;
      private String lblTextblockperiodistaasisnom_Internalname ;
      private String lblTextblockperiodistaasisnom_Jsonclick ;
      private String edtPeriodistaAsisNom_Internalname ;
      private String edtPeriodistaAsisNom_Jsonclick ;
      private String sMode12 ;
      private String edtPublicidadId_Internalname ;
      private String tblTable3_Internalname ;
      private String lblTitlepublicidad_Internalname ;
      private String lblTitlepublicidad_Jsonclick ;
      private String tblTabletoolbar_Internalname ;
      private String divSectiontoolbar_Internalname ;
      private String imgBtn_first_Internalname ;
      private String imgBtn_first_Jsonclick ;
      private String imgBtn_first_separator_Internalname ;
      private String imgBtn_first_separator_Jsonclick ;
      private String imgBtn_previous_Internalname ;
      private String imgBtn_previous_Jsonclick ;
      private String imgBtn_previous_separator_Internalname ;
      private String imgBtn_previous_separator_Jsonclick ;
      private String imgBtn_next_Internalname ;
      private String imgBtn_next_Jsonclick ;
      private String imgBtn_next_separator_Internalname ;
      private String imgBtn_next_separator_Jsonclick ;
      private String imgBtn_last_Internalname ;
      private String imgBtn_last_Jsonclick ;
      private String imgBtn_last_separator_Internalname ;
      private String imgBtn_last_separator_Jsonclick ;
      private String imgBtn_select_Internalname ;
      private String imgBtn_select_Jsonclick ;
      private String imgBtn_select_separator_Internalname ;
      private String imgBtn_select_separator_Jsonclick ;
      private String imgBtn_enter2_Internalname ;
      private String imgBtn_enter2_Jsonclick ;
      private String imgBtn_enter2_separator_Internalname ;
      private String imgBtn_enter2_separator_Jsonclick ;
      private String imgBtn_cancel2_Internalname ;
      private String imgBtn_cancel2_Jsonclick ;
      private String imgBtn_cancel2_separator_Internalname ;
      private String imgBtn_cancel2_separator_Jsonclick ;
      private String imgBtn_delete2_Internalname ;
      private String imgBtn_delete2_Jsonclick ;
      private String imgBtn_delete2_separator_Internalname ;
      private String imgBtn_delete2_separator_Jsonclick ;
      private String AV15Pgmname ;
      private String sMode8 ;
      private String sEvt ;
      private String EvtGridId ;
      private String EvtRowId ;
      private String sEvtType ;
      private String edtPublicidadCosto_Internalname ;
      private String imgprompt_16_Internalname ;
      private String subGridguia_publicidad_Class ;
      private String subGridguia_publicidad_Linesclass ;
      private String imgprompt_16_Link ;
      private String ROClassString ;
      private String edtPublicidadId_Jsonclick ;
      private String edtPublicidadCosto_Jsonclick ;
      private String GXCCtl ;
      private String sDynURL ;
      private String FormProcess ;
      private String subGridguia_publicidad_Internalname ;
      private DateTime A23GuiaFecha ;
      private DateTime Z23GuiaFecha ;
      private bool entryPointCalled ;
      private bool wbErr ;
      private bool n33PeriodistaRespNom ;
      private bool n39PeriodistaAsisNom ;
      private bool AV9IsAuthorized ;
      private bool returnInSub ;
      private String A24GuiaDescripcion ;
      private String A33PeriodistaRespNom ;
      private String A39PeriodistaAsisNom ;
      private String Z24GuiaDescripcion ;
      private String Z33PeriodistaRespNom ;
      private String Z39PeriodistaAsisNom ;
      private GxWebSession AV11WebSession ;
      private GxUnknownObjectCollection isValidOutput ;
      private GXMasterPage MasterPageObj ;
      private GXWebGrid Gridguia_publicidadContainer ;
      private GXWebRow Gridguia_publicidadRow ;
      private GXWebColumn Gridguia_publicidadColumn ;
      private IGxDataStore dsDefault ;
      private IDataStoreProvider pr_default ;
      private String[] T00078_A39PeriodistaAsisNom ;
      private bool[] T00078_n39PeriodistaAsisNom ;
      private String[] T00077_A33PeriodistaRespNom ;
      private bool[] T00077_n33PeriodistaRespNom ;
      private short[] T00079_A22GuiaId ;
      private DateTime[] T00079_A23GuiaFecha ;
      private String[] T00079_A24GuiaDescripcion ;
      private String[] T00079_A33PeriodistaRespNom ;
      private bool[] T00079_n33PeriodistaRespNom ;
      private String[] T00079_A39PeriodistaAsisNom ;
      private bool[] T00079_n39PeriodistaAsisNom ;
      private short[] T00079_A32PeriodistaRespId ;
      private short[] T00079_A38PeriodistaAsisId ;
      private String[] T000710_A33PeriodistaRespNom ;
      private bool[] T000710_n33PeriodistaRespNom ;
      private String[] T000711_A39PeriodistaAsisNom ;
      private bool[] T000711_n39PeriodistaAsisNom ;
      private short[] T000712_A22GuiaId ;
      private short[] T00076_A22GuiaId ;
      private DateTime[] T00076_A23GuiaFecha ;
      private String[] T00076_A24GuiaDescripcion ;
      private short[] T00076_A32PeriodistaRespId ;
      private short[] T00076_A38PeriodistaAsisId ;
      private short[] T000713_A22GuiaId ;
      private short[] T000714_A22GuiaId ;
      private short[] T000715_A22GuiaId ;
      private DateTime[] T000715_A23GuiaFecha ;
      private String[] T000715_A24GuiaDescripcion ;
      private short[] T000715_A32PeriodistaRespId ;
      private short[] T000715_A38PeriodistaAsisId ;
      private short[] T000717_A22GuiaId ;
      private String[] T000720_A33PeriodistaRespNom ;
      private bool[] T000720_n33PeriodistaRespNom ;
      private String[] T000721_A39PeriodistaAsisNom ;
      private bool[] T000721_n39PeriodistaAsisNom ;
      private short[] T000722_A22GuiaId ;
      private short[] T000723_A22GuiaId ;
      private short[] T000723_A19PublicidadCosto ;
      private short[] T000723_A16PublicidadId ;
      private short[] T00074_A16PublicidadId ;
      private short[] T000724_A16PublicidadId ;
      private short[] T000725_A22GuiaId ;
      private short[] T000725_A16PublicidadId ;
      private short[] T00073_A22GuiaId ;
      private short[] T00073_A19PublicidadCosto ;
      private short[] T00073_A16PublicidadId ;
      private short[] T00072_A22GuiaId ;
      private short[] T00072_A19PublicidadCosto ;
      private short[] T00072_A16PublicidadId ;
      private short[] T000729_A22GuiaId ;
      private short[] T000729_A16PublicidadId ;
      private short[] T000730_A16PublicidadId ;
      private short[] T00075_A22GuiaId ;
      private DateTime[] T00075_A23GuiaFecha ;
      private String[] T00075_A24GuiaDescripcion ;
      private short[] T00075_A32PeriodistaRespId ;
      private short[] T00075_A38PeriodistaAsisId ;
      private GXWebForm Form ;
      private SdtTransactionContext AV10TrnContext ;
      private SdtTransactionContext_Attribute AV14TrnContextAtt ;
   }

   public class guia__default : DataStoreHelperBase, IDataStoreHelper
   {
      public ICursor[] getCursors( )
      {
         cursorDefinitions();
         return new Cursor[] {
          new ForEachCursor(def[0])
         ,new ForEachCursor(def[1])
         ,new ForEachCursor(def[2])
         ,new ForEachCursor(def[3])
         ,new ForEachCursor(def[4])
         ,new ForEachCursor(def[5])
         ,new ForEachCursor(def[6])
         ,new ForEachCursor(def[7])
         ,new ForEachCursor(def[8])
         ,new ForEachCursor(def[9])
         ,new ForEachCursor(def[10])
         ,new ForEachCursor(def[11])
         ,new ForEachCursor(def[12])
         ,new ForEachCursor(def[13])
         ,new UpdateCursor(def[14])
         ,new ForEachCursor(def[15])
         ,new UpdateCursor(def[16])
         ,new UpdateCursor(def[17])
         ,new ForEachCursor(def[18])
         ,new ForEachCursor(def[19])
         ,new ForEachCursor(def[20])
         ,new ForEachCursor(def[21])
         ,new ForEachCursor(def[22])
         ,new ForEachCursor(def[23])
         ,new UpdateCursor(def[24])
         ,new UpdateCursor(def[25])
         ,new UpdateCursor(def[26])
         ,new ForEachCursor(def[27])
         ,new ForEachCursor(def[28])
       };
    }

    private static CursorDef[] def;
    private void cursorDefinitions( )
    {
       if ( def == null )
       {
          Object[] prmT00075 ;
          prmT00075 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00079 ;
          prmT00079 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00077 ;
          prmT00077 = new Object[] {
          new Object[] {"@PeriodistaRespId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00078 ;
          prmT00078 = new Object[] {
          new Object[] {"@PeriodistaAsisId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000710 ;
          prmT000710 = new Object[] {
          new Object[] {"@PeriodistaRespId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000711 ;
          prmT000711 = new Object[] {
          new Object[] {"@PeriodistaAsisId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000712 ;
          prmT000712 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00076 ;
          prmT00076 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000713 ;
          prmT000713 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000714 ;
          prmT000714 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000715 ;
          prmT000715 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000716 ;
          prmT000716 = new Object[] {
          new Object[] {"@GuiaFecha",SqlDbType.DateTime,8,0} ,
          new Object[] {"@GuiaDescripcion",SqlDbType.VarChar,40,0} ,
          new Object[] {"@PeriodistaRespId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@PeriodistaAsisId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000717 ;
          prmT000717 = new Object[] {
          } ;
          Object[] prmT000718 ;
          prmT000718 = new Object[] {
          new Object[] {"@GuiaFecha",SqlDbType.DateTime,8,0} ,
          new Object[] {"@GuiaDescripcion",SqlDbType.VarChar,40,0} ,
          new Object[] {"@PeriodistaRespId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@PeriodistaAsisId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000719 ;
          prmT000719 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000722 ;
          prmT000722 = new Object[] {
          } ;
          Object[] prmT000723 ;
          prmT000723 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@PublicidadId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00074 ;
          prmT00074 = new Object[] {
          new Object[] {"@PublicidadId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000724 ;
          prmT000724 = new Object[] {
          new Object[] {"@PublicidadId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000725 ;
          prmT000725 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@PublicidadId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00073 ;
          prmT00073 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@PublicidadId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00072 ;
          prmT00072 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@PublicidadId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000726 ;
          prmT000726 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@PublicidadCosto",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@PublicidadId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000727 ;
          prmT000727 = new Object[] {
          new Object[] {"@PublicidadCosto",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@PublicidadId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000728 ;
          prmT000728 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@PublicidadId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000729 ;
          prmT000729 = new Object[] {
          new Object[] {"@GuiaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000720 ;
          prmT000720 = new Object[] {
          new Object[] {"@PeriodistaRespId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000721 ;
          prmT000721 = new Object[] {
          new Object[] {"@PeriodistaAsisId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000730 ;
          prmT000730 = new Object[] {
          new Object[] {"@PublicidadId",SqlDbType.SmallInt,4,0}
          } ;
          def= new CursorDef[] {
              new CursorDef("T00072", "SELECT [GuiaId], [PublicidadCosto], [PublicidadId] FROM [GuiaPublicidad] WITH (UPDLOCK) WHERE [GuiaId] = @GuiaId AND [PublicidadId] = @PublicidadId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00072,1,0,true,false )
             ,new CursorDef("T00073", "SELECT [GuiaId], [PublicidadCosto], [PublicidadId] FROM [GuiaPublicidad] WITH (NOLOCK) WHERE [GuiaId] = @GuiaId AND [PublicidadId] = @PublicidadId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00073,1,0,true,false )
             ,new CursorDef("T00074", "SELECT [PublicidadId] FROM [Publicidad] WITH (NOLOCK) WHERE [PublicidadId] = @PublicidadId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00074,1,0,true,false )
             ,new CursorDef("T00075", "SELECT [GuiaId], [GuiaFecha], [GuiaDescripcion], [PeriodistaRespId] AS PeriodistaRespId, [PeriodistaAsisId] AS PeriodistaAsisId FROM [Guia] WITH (UPDLOCK) WHERE [GuiaId] = @GuiaId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00075,1,0,true,false )
             ,new CursorDef("T00076", "SELECT [GuiaId], [GuiaFecha], [GuiaDescripcion], [PeriodistaRespId] AS PeriodistaRespId, [PeriodistaAsisId] AS PeriodistaAsisId FROM [Guia] WITH (NOLOCK) WHERE [GuiaId] = @GuiaId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00076,1,0,true,false )
             ,new CursorDef("T00077", "SELECT [PeriodistaNombre] AS PeriodistaRespNom FROM [Periodista] WITH (NOLOCK) WHERE [PeriodistaId] = @PeriodistaRespId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00077,1,0,true,false )
             ,new CursorDef("T00078", "SELECT [PeriodistaNombre] AS PeriodistaAsisNom FROM [Periodista] WITH (NOLOCK) WHERE [PeriodistaId] = @PeriodistaAsisId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00078,1,0,true,false )
             ,new CursorDef("T00079", "SELECT TM1.[GuiaId], TM1.[GuiaFecha], TM1.[GuiaDescripcion], T2.[PeriodistaNombre] AS PeriodistaRespNom, T3.[PeriodistaNombre] AS PeriodistaAsisNom, TM1.[PeriodistaRespId] AS PeriodistaRespId, TM1.[PeriodistaAsisId] AS PeriodistaAsisId FROM (([Guia] TM1 WITH (NOLOCK) INNER JOIN [Periodista] T2 WITH (NOLOCK) ON T2.[PeriodistaId] = TM1.[PeriodistaRespId]) INNER JOIN [Periodista] T3 WITH (NOLOCK) ON T3.[PeriodistaId] = TM1.[PeriodistaAsisId]) WHERE TM1.[GuiaId] = @GuiaId ORDER BY TM1.[GuiaId]  OPTION (FAST 100)",true, GxErrorMask.GX_NOMASK, false, this,prmT00079,100,0,true,false )
             ,new CursorDef("T000710", "SELECT [PeriodistaNombre] AS PeriodistaRespNom FROM [Periodista] WITH (NOLOCK) WHERE [PeriodistaId] = @PeriodistaRespId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000710,1,0,true,false )
             ,new CursorDef("T000711", "SELECT [PeriodistaNombre] AS PeriodistaAsisNom FROM [Periodista] WITH (NOLOCK) WHERE [PeriodistaId] = @PeriodistaAsisId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000711,1,0,true,false )
             ,new CursorDef("T000712", "SELECT [GuiaId] FROM [Guia] WITH (NOLOCK) WHERE [GuiaId] = @GuiaId  OPTION (FAST 1)",true, GxErrorMask.GX_NOMASK, false, this,prmT000712,1,0,true,false )
             ,new CursorDef("T000713", "SELECT TOP 1 [GuiaId] FROM [Guia] WITH (NOLOCK) WHERE ( [GuiaId] > @GuiaId) ORDER BY [GuiaId]  OPTION (FAST 1)",true, GxErrorMask.GX_NOMASK, false, this,prmT000713,1,0,true,true )
             ,new CursorDef("T000714", "SELECT TOP 1 [GuiaId] FROM [Guia] WITH (NOLOCK) WHERE ( [GuiaId] < @GuiaId) ORDER BY [GuiaId] DESC  OPTION (FAST 1)",true, GxErrorMask.GX_NOMASK, false, this,prmT000714,1,0,true,true )
             ,new CursorDef("T000715", "SELECT [GuiaId], [GuiaFecha], [GuiaDescripcion], [PeriodistaRespId] AS PeriodistaRespId, [PeriodistaAsisId] AS PeriodistaAsisId FROM [Guia] WITH (UPDLOCK) WHERE [GuiaId] = @GuiaId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000715,1,0,true,false )
             ,new CursorDef("T000716", "INSERT INTO [Guia] ([GuiaFecha], [GuiaDescripcion], [PeriodistaRespId], [PeriodistaAsisId]) VALUES (@GuiaFecha, @GuiaDescripcion, @PeriodistaRespId, @PeriodistaAsisId)", GxErrorMask.GX_NOMASK,prmT000716)
             ,new CursorDef("T000717", "SELECT Ident_Current('[Guia]') ",true, GxErrorMask.GX_NOMASK, false, this,prmT000717,1,0,true,false )
             ,new CursorDef("T000718", "UPDATE [Guia] SET [GuiaFecha]=@GuiaFecha, [GuiaDescripcion]=@GuiaDescripcion, [PeriodistaRespId]=@PeriodistaRespId, [PeriodistaAsisId]=@PeriodistaAsisId  WHERE [GuiaId] = @GuiaId", GxErrorMask.GX_NOMASK,prmT000718)
             ,new CursorDef("T000719", "DELETE FROM [Guia]  WHERE [GuiaId] = @GuiaId", GxErrorMask.GX_NOMASK,prmT000719)
             ,new CursorDef("T000720", "SELECT [PeriodistaNombre] AS PeriodistaRespNom FROM [Periodista] WITH (NOLOCK) WHERE [PeriodistaId] = @PeriodistaRespId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000720,1,0,true,false )
             ,new CursorDef("T000721", "SELECT [PeriodistaNombre] AS PeriodistaAsisNom FROM [Periodista] WITH (NOLOCK) WHERE [PeriodistaId] = @PeriodistaAsisId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000721,1,0,true,false )
             ,new CursorDef("T000722", "SELECT [GuiaId] FROM [Guia] WITH (NOLOCK) ORDER BY [GuiaId]  OPTION (FAST 100)",true, GxErrorMask.GX_NOMASK, false, this,prmT000722,100,0,true,false )
             ,new CursorDef("T000723", "SELECT [GuiaId], [PublicidadCosto], [PublicidadId] FROM [GuiaPublicidad] WITH (NOLOCK) WHERE [GuiaId] = @GuiaId and [PublicidadId] = @PublicidadId ORDER BY [GuiaId], [PublicidadId] ",true, GxErrorMask.GX_NOMASK, false, this,prmT000723,11,0,true,false )
             ,new CursorDef("T000724", "SELECT [PublicidadId] FROM [Publicidad] WITH (NOLOCK) WHERE [PublicidadId] = @PublicidadId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000724,1,0,true,false )
             ,new CursorDef("T000725", "SELECT [GuiaId], [PublicidadId] FROM [GuiaPublicidad] WITH (NOLOCK) WHERE [GuiaId] = @GuiaId AND [PublicidadId] = @PublicidadId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000725,1,0,true,false )
             ,new CursorDef("T000726", "INSERT INTO [GuiaPublicidad] ([GuiaId], [PublicidadCosto], [PublicidadId]) VALUES (@GuiaId, @PublicidadCosto, @PublicidadId)", GxErrorMask.GX_NOMASK,prmT000726)
             ,new CursorDef("T000727", "UPDATE [GuiaPublicidad] SET [PublicidadCosto]=@PublicidadCosto  WHERE [GuiaId] = @GuiaId AND [PublicidadId] = @PublicidadId", GxErrorMask.GX_NOMASK,prmT000727)
             ,new CursorDef("T000728", "DELETE FROM [GuiaPublicidad]  WHERE [GuiaId] = @GuiaId AND [PublicidadId] = @PublicidadId", GxErrorMask.GX_NOMASK,prmT000728)
             ,new CursorDef("T000729", "SELECT [GuiaId], [PublicidadId] FROM [GuiaPublicidad] WITH (NOLOCK) WHERE [GuiaId] = @GuiaId ORDER BY [GuiaId], [PublicidadId] ",true, GxErrorMask.GX_NOMASK, false, this,prmT000729,11,0,true,false )
             ,new CursorDef("T000730", "SELECT [PublicidadId] FROM [Publicidad] WITH (NOLOCK) WHERE [PublicidadId] = @PublicidadId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000730,1,0,true,false )
          };
       }
    }

    public void getResults( int cursor ,
                            IFieldGetter rslt ,
                            Object[] buf )
    {
       switch ( cursor )
       {
             case 0 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                ((short[]) buf[2])[0] = rslt.getShort(3) ;
                break;
             case 1 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                ((short[]) buf[2])[0] = rslt.getShort(3) ;
                break;
             case 2 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 3 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((DateTime[]) buf[1])[0] = rslt.getGXDate(2) ;
                ((String[]) buf[2])[0] = rslt.getVarchar(3) ;
                ((short[]) buf[3])[0] = rslt.getShort(4) ;
                ((short[]) buf[4])[0] = rslt.getShort(5) ;
                break;
             case 4 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((DateTime[]) buf[1])[0] = rslt.getGXDate(2) ;
                ((String[]) buf[2])[0] = rslt.getVarchar(3) ;
                ((short[]) buf[3])[0] = rslt.getShort(4) ;
                ((short[]) buf[4])[0] = rslt.getShort(5) ;
                break;
             case 5 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                ((bool[]) buf[1])[0] = rslt.wasNull(1);
                break;
             case 6 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                ((bool[]) buf[1])[0] = rslt.wasNull(1);
                break;
             case 7 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((DateTime[]) buf[1])[0] = rslt.getGXDate(2) ;
                ((String[]) buf[2])[0] = rslt.getVarchar(3) ;
                ((String[]) buf[3])[0] = rslt.getVarchar(4) ;
                ((bool[]) buf[4])[0] = rslt.wasNull(4);
                ((String[]) buf[5])[0] = rslt.getVarchar(5) ;
                ((bool[]) buf[6])[0] = rslt.wasNull(5);
                ((short[]) buf[7])[0] = rslt.getShort(6) ;
                ((short[]) buf[8])[0] = rslt.getShort(7) ;
                break;
             case 8 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                ((bool[]) buf[1])[0] = rslt.wasNull(1);
                break;
             case 9 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                ((bool[]) buf[1])[0] = rslt.wasNull(1);
                break;
             case 10 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 11 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 12 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 13 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((DateTime[]) buf[1])[0] = rslt.getGXDate(2) ;
                ((String[]) buf[2])[0] = rslt.getVarchar(3) ;
                ((short[]) buf[3])[0] = rslt.getShort(4) ;
                ((short[]) buf[4])[0] = rslt.getShort(5) ;
                break;
             case 15 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 18 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                ((bool[]) buf[1])[0] = rslt.wasNull(1);
                break;
             case 19 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                ((bool[]) buf[1])[0] = rslt.wasNull(1);
                break;
             case 20 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 21 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                ((short[]) buf[2])[0] = rslt.getShort(3) ;
                break;
             case 22 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 23 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                break;
             case 27 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                break;
             case 28 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
       }
    }

    public void setParameters( int cursor ,
                               IFieldSetter stmt ,
                               Object[] parms )
    {
       switch ( cursor )
       {
             case 0 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 1 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 2 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 3 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 4 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 5 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 6 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 7 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 8 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 9 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 10 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 11 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 12 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 13 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 14 :
                stmt.SetParameter(1, (DateTime)parms[0]);
                stmt.SetParameter(2, (String)parms[1]);
                stmt.SetParameter(3, (short)parms[2]);
                stmt.SetParameter(4, (short)parms[3]);
                break;
             case 16 :
                stmt.SetParameter(1, (DateTime)parms[0]);
                stmt.SetParameter(2, (String)parms[1]);
                stmt.SetParameter(3, (short)parms[2]);
                stmt.SetParameter(4, (short)parms[3]);
                stmt.SetParameter(5, (short)parms[4]);
                break;
             case 17 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 18 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 19 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 21 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 22 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 23 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 24 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                stmt.SetParameter(3, (short)parms[2]);
                break;
             case 25 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                stmt.SetParameter(3, (short)parms[2]);
                break;
             case 26 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 27 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 28 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
       }
    }

 }

}
